On our webforms when we create a File component that is configured to upload to a private directory we see a weird issue. Document files like docx or pdfs work fine. They upload fine and when you click on the link in the submission for the uploaded files which will have a URL with "/system/files/webform/..." it works fine. But for image files like jpg or gif, they upload fine but when you click on the link in the submission we get a 404 error. Something is preventing access to image files uploaded to private directories. If I look in our $root/files/private/webform area the image files are definitely there.

We thought at first it might be some strange conflict with the IMCE module, but we totally disabled the module and the problem persists.

There is no issue with image files with File components using public directories.

Any idea what could be causing this issue?

Comments

paulraines’s picture

Status: Active » Closed (won't fix)

Turns out to be the Fast 404 module causing the problem.

Liam Morland’s picture

I fixed it by adding '/system/files/' to fast_404_string_whitelisting.

anthonyroundtree’s picture

I'm having the same issue, but do not have the Fast 404 module installed. Could it be something else?

Liam Morland’s picture

You may need to add debugging statements to see what part of code is triggering the 404. It is also possible that this is caused by something at the web server level such as something like ModSecurity.

If this started with a Webform upgrade, and rolling-back fixes it, then you can use git bisect to find out which commit caused the problem.