Announcement

Collapse
No announcement yet.

Unable to open documents and attachments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to open documents and attachments

    We recently copied all of our Espo files and moved them from one domain to another (same server) as the old domain was having permission issues (I think because Espo was installed logged in as root, rather than a regular user). The database has remained the same. Now when we try and open documents or attachments that were uploaded before the move, we're unable to open them (we can download, but get an error message when we try and open). Is there something I need to change somewhere in order to relink the old documents and attachments to the new site?

  • #2
    For further info: we're using 5.5.6 and the permissions for the data/upload folder are set to rwx for owner, r-x for group and r-- for others.

    Comment


    • #3
      Hello,
      if permission are correct :
      maybe :
      can you create a new document and download it normaly ?

      maybe :
      .htaccess (config webserver) file issue.

      Comment


      • #4
        Hello,
        have you made import of your database? Compare the unique id of this files in espo/data/upload with this records in your DB.

        Comment


        • #5
          Hi both,

          Thanks for your responses.

          item yes, if I add a new file I'm able to download and open it fine. I've had a quick look in the .htaccess file but I can't see anything that looks like it might be specific to the old domain? I don't really know what I'm looking at though to be honest!

          Maximus I haven't imported the database, no. Because I was transferring it to a new domain on the same server, I just left the database alone. The copied files still point to the same database as before.
          Last edited by Hannah; 02-19-2019, 02:26 PM.

          Comment


          • #6
            What in the error log files?

            Comment


            • #7
              Maximus There's nothing in the error logs relating to this issue. I just tried downloading attachments/documents again, went to the error log file and Espo hasn't even generated an error log for today. It's odd, because I can download the file, but when I go to open it, it says the file is corrupt. It then attempts to repair it and Word usually can repair .docx files, but Excel has no luck with .xlsx.

              Comment


              • #8
                Hello,

                Same issue when downloading (on my computer.... not on production)
                I have try :
                I create xlsx with my custom script and save it to data/upload folder .. then open directly there .. no problem
                I create xlsx (same custom script) and make it "direct download" (php://output) .. and xlsx is corrupt !
                I have see, some think put +- 200char " " empty string on the head of file ! Then the file is see as corrupt.

                I think is appache/nginx/header issue.



                Comment


                • #9
                  Hello,
                  have you change 'Site URL' in the Administration -> Settings

                  Comment


                  • #10
                    Originally posted by Maximus View Post
                    Hello,
                    have you change 'Site URL' in the Administration -> Settings
                    Hello Maximus,
                    yes.. because with template, some auto generate link like "accept/decline" or other are not clickable..
                    http://. become http// this is why I have removed http:// from siteUrl.



                    Comment


                    • #11
                      Hi Maximus and item

                      That's a very good point and I hadn't changed it. I have now and I've done a rebuild/cleared the cache since, but still no luck...

                      Comment


                      • #12
                        Hello,

                        news about corrupted download or image views :
                        espoCRM 5.7.7
                        php 7.3.x
                        nginx/apache

                        when i click "use cache" to yes in admin setting, .. logo image are displayed !
                        when it's set to no ... logo image is not displayed .. so I

                        can't replicate on demo instance.

                        Regards



                        Comment

                        Working...
                        X