Forum

Thread tagged as: Problem, Addons, Forms

"(File not available to download)" after upload through Forms App

Hello, I am using the Forms App for a client to gather leads at a trade show. In the form there is a file field, so the client can attach a photo of a business card.
Uploading works fine. But in Perch Admin, where the uploaded file is listed in the Forms App, only the name of the file is displayed, with the message "(File not available to download)". The file upload folder is set to readable. Is there a way, to make the file downloadable? Or what might trigger the file not being downloadable in the first place? Thanks in advance. Nils.

Nils Mielke

Nils Mielke 3 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

When you say uploading works fine, do you mean you can see the uploaded files on the file system?

Exactly, Drew.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are the files readable by PHP?

I just used PHP's is_readable to check and yes, the files are readable.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch is using file_exists(), which is returning false for some reason. Why, I couldn't tell you without seeing it.

I just tried that. Returns true as well.
In the Perch form settings I get the notice "The file path cards/ is not writable by PHP.”
The access rights are set to 777, though.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the path set from the filesystem root?

That did it.
I must have misinterpreted the hint "Must be absolute system path outside site public root" and thought it's a "only if" statement. (Sorry, English is not my first language.)
Many thanks, Drew.