Forum

Thread tagged as: Problem, Runway

Can't get file upload for members in Runway site to work

I am trying to give members of the site I am working on the possibility to upload files.
But I always get a not very specific error:

[26-Sep-2016 15:04:28 Europe/Berlin] PHP Warning:  move_uploaded_file(/perch/uploaded/Testfile.pdf): failed to open stream: No such file or directory in /xxxxx.class.php on line 146
[26-Sep-2016 15:04:28 Europe/Berlin] PHP Warning:  move_uploaded_file(): Unable to move '/tmp/phpbBX1yl' to '/perch/uploaded/Testfile.pdf' in /xxxxx.class.php on line 146

The folder I want the files to be uploaded to lives in my 'perch' folder.
Is the error related to the Runway routing?
What would be the correct path? I have tried "/perch/uploaded/", "perch/uploaded/", "/uploaded/" and "uploaded/" without success. Also I moved the folder to the root level for testing.
(To verify I do understand the uploading code, I created a basic, non-Perch form on another web server. There I managed to upload files.)

Nils Mielke

Nils Mielke 3 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Presuming you're specifying this in your buckets.php file, the path needs to be a full file system path.

Do resource buckets work with frontend uploads for logged-in members?
Is there any documentation on this?
Anyway, it was the full file system path lacking from my upload function. It's working now.
Thanks very much for your support.