Unable to Download the documents

up problem 7.8.3 version.

Please change this setting. enable fileinfo php 5.4 version.

problem fixed.

thank you so much.

2 Likes

Hi mike, and everbody

I have a problem like that, when i try to upload a file all well, but when i try to download throw me this error:

what’s could be happening?

What permissions do you see on your “upload” directory, and specifically on that file? It seems PHP can’t get information about the file.

I made a little patch for that on the file called upload_file.php,

happened that when I upload and I save a document, save it the document with the document_id as name physically, then on the list_view show the records but use it the document_revision_id and not exists(should be document_id)… but I don’t know why the sistem do that, or if is a change from one suitecrm version to other…

You can read an explanation of how Documents (and revisions) are stored here:

https://pgorod.github.io/How-Documents-Stored/

But I don’t think you should be going into that. If your system was working properly you wouldn’t have to worry about any of this, it would just work.

So you should be getting your permissions right, but I asked you a question about that and you haven’t answered yet… :slight_smile:

oh yeah!.., my upload file folder have permissions 775 and the uploaded file the same permissions 775, the problem is,
on the crm show me each link record to download a file with the document_revision_id when should be the document_id

                                                                      [document_revision_id] (this not exist on my upload folder)

http://domain?entryPoint=download&id=94b9d48a-492b-3f1f-2fa0-592f0008881e&type=Documents

                                                                      [document_id] should be (this document id document exist on my folder)

http://domain?entryPoint=download&id=94b9d48a-492b-3f1f-2fa0-592f0008881e&type=Documents

i don’t know why happened that, since I upgraded the crm… you understand?

But that is very strange because actually it’s the revisions that get stored on the disk. So it is right to link to the revision. Obviously different revisions will have to get different file names on disk.

What I don’t understand is why the file is saved with the document_id. That is what is wrong.

For debugging permissions I need to get the full output of this command in your upload directory

ls -al

in that directory. I need to check ownership, permissions, and the sticky bit, of the parent directory, and the ownership and permissions on the specific file.

Finally: why is that an “entry point” link? Is it being served externally via Email? Why is it not a normal “index.php” link? I believe “entrypoint” links don’t even use the “upload” directory, they use copies in the “public” directory…

oh yeah, here the screenshots
:

really i don’t know, this crm was very customized, and my download.php file are on my suitecrm root folder

very strange… i guess all permissions are valid

Exactly where do you click to download the file? You go into Documents, then enter a document, and click on a specific revision?

I only enter to contact’s module, then display the document’s subpanel, then I hit on any document link and not works, not is downloaded

I turned on “fileinfo” module as you indicated and now I can download my documents correctly. Thank you very much, you saved me a lot of time and hair XD