404 page not found even if file present in "espocrm/data/upload" folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chr1st0ph9
    Member
    • Jun 2016
    • 37

    404 page not found even if file present in "espocrm/data/upload" folder

    Hello,
    after migrating, I had to copy (cause missing) a PDF file named 5a97d33a9f3e07037 in the /var/www/html/espocrm/data/upload folder.
    Curiously, even if I now have it in the right place I still get the error message 404 Page Not Found

    I checked the path and the access rights and privileges, they are ok and identical to the other upload files.

    So my question, is there any other actions that need to be done to make the pdf file accessible?
    (there are no error/warning message in the log file).

    thank you for your help and merry Christmas
    Christophe



  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello Christophe,
    do you have the record with this id in `attachment` table (database)?
    Regards,
    Tanya

    P.S. Merry Christmas

    Comment

    • chr1st0ph9
      Member
      • Jun 2016
      • 37

      #3
      Thank you Tania!

      Yes the record "5a97d33a9f3e07037" is in the database:


      MariaDB [espocrm]> select * FROM attachment WHERE id="5a97d33a9f3e07037";
      +-------------------+---------------------------+---------+-----------------+-------+-------------------+---------------------+------------+--------+-------------------+-------------+------------+--------------+---------------+---------+-------------------+-------+
      | id | name | deleted | type | size | source_id | created_at | role | global | parent_id | parent_type | related_id | related_type | created_by_id | storage | storage_file_path | field |
      +-------------------+---------------------------+---------+-----------------+-------+-------------------+---------------------+------------+--------+-------------------+-------------+------------+--------------+---------------+---------+-------------------+-------+
      | 5a97d33a9f3e07037 | Devis 4109 du 1-03-18.pdf | 0 | application/pdf | 31501 | 5a97cdfb815655053 | 2018-03-01 10:17:30 | Attachment | 0 | 5a97d3c9b63f93155 | Email | NULL | NULL | 1 | NULL | NULL | NULL |
      +-------------------+---------------------------+---------+-----------------+-------+-------------------+---------------------+------------+--------+-------------------+-------------+------------+--------------+---------------+---------+-------------------+-------+

      1 row in set (0.01 sec)
      MariaDB [espocrm]>


      The file is also well located in the data/upload subdirectory:

      aUserName@myHost:/var/www/html/espocrm/data/upload$ ls -l 5a97d33a9f3e07037
      -rw-rw-r-- 1 www-data www-data 40043 Dec 24 13:54 5a97d33a9f3e07037


      The only thing missing is the thumb in the .../data/upload/thumb directory.
      But I do not know how to generate it.

      Best Regards,
      Christophe

      Comment

      Working...