New Update has caused some attachment unreadable - 404 not found

Hi, anyone experienced attachments in ERP suddenly can’t be opened showing below error:

We checked several documents which can’t be opened and all has file names containing special characters like #, &, and (). Is there a way to resolve this? because there are too many attachments in our ERP like this and some we dont have back-ups.

Please help me resolve this issue.
Thank you.

1 Like

So what previous version did you update from and did the problem did not exist then?

If you are self hosted check the logs - frappe-bench/logs/* and /var/log/nginx logs for details.

Note this report traceback that seems suggests a filename issue too Problem to attach file after update

Hi, thank you for your reply. We updated from 11.1.25 and this issue does not exist. After the update, the attachments with special character in file name cannot be opened.

Hi @zyc_tess

If this is a general issue then it requires urgent attention. Can you please open a Github issue?

Kind regards,

Hi @wale

Thank you for your assistance, I opened an issue as per your instruction with this link: Attachment became unreadable after update, showing error: 404 not found · Issue #18445 · frappe/erpnext · GitHub

Is there a way we can resolve this issues? before the update, there is nothing wrong with the attachments which is why we keep using this special characters in the file name - but after the update, all this files can’t be opened anymore and there is no way we can re-upload this documents so we need them to be readable again. This attachments are important to us, and we need resolution as soon as possible.

Also having this issue. Moved from v10 to v12 so didn’t get a chance to check v11. Seems to happen with private files. When changed to public the file loads.

Upgrading from v13 to v14 created this issue for me… I know it’s an old thread but did it ever get solved?

Does anybody else have issues with attachements on v14?

I also tried a fresh install on v14, uploaded a bunch of files for testing, all show the same behavior:
You can upload fine, but cannot load without the 404 error. Tried filenames with space and other without space, images, docs, pdf, text file, all the same issue.

Note: on v13 I had a standalone install… v14 I started to use docker… maybe something wrong in the routing of HTTP request in docker setup?

Ok, so now it’s working and I believe the issue was how the request headers were set at the reverse proxy level.

more specifically, I made sure these headers were explicitly referencing my erpnext site name

on nginx reverse proxy:

proxy_set_header X-Frappe-Site-Name site1.erpnext.local;
proxy_set_header Host site1.erpnext.local;