Does ColdFusion have write permissions to the /var/www folder?
Yes it does, BUT it DIDN'T have permission to /var/www/upload/ !!! Stupid me for assuming that new folders I create in a directory assume the permissions of the parent directory.
No problem Paul.. It is always the little things that get us!
If you didn't have permissions, didn't you get an error message telling you that?
Oddly, no. I copied my single-file uploader into the admin folder, and when I uploaded a single file, I got my generic error from Application.cfc. When I commented the error handler out, I got the actual error and knew Tim was right. The multi-file uploader didn't give me any clue about what was wrong.
So, now that files are uploading, how do you get the page to do something else once the files have uploaded. Is the JS route the only way? I'd like to forward to a processing page after the upload where I can do things like pick an album for the photos. Unless of course there's a way to associate them with an album at the time of upload.
I sort of solved this by wrapping the cffileupoad with a form tag with an action pointing to my processing page, then adding a submit button with the value of "Next". Now I can forward to my processing page with a click after the files are uploaded.
Trying to do it with a JS function connected to the cffileupload tag resulted in a 302 error.
I'm afraid I'm back to having problems with this again.
It all worked perfectly on my CF10 local install, but once on the server (CF9 shared hosting) I'm getting 401 errors when I try to upload. The directory permissions should be fine, as I've tried everything up to (and including) 777.
I've also tried fiddling with the createUUID() thing without any luck, and last night I abandoned <cffileupload> and tried the HTML5 multi-upload box, but I can't seem to get a processing page to see what I'm uploading from that.
So I'm sort of stuck doing the FTP thing. Any ideas?
Ok, so I have a little more info.
So far I have tried:
- Changing file permissions on the processing page.
- Verifying that the upload directory has write permissions.
- urlencodedformatting both the session token and the entire pagename?token combo
- Specifying both the processing page by filename and by /path/filename
- session and jsession session variables
When I specify the processing page in the <cffileupload> tag, I get a 401 error
When I specify it as a /path/filename, I get a 404 error. In the CF error log, it looks like the path is getting passed twice. (/home/username/public_html/home/username/public_html/filename.cfm)
I'm to the point where I'm about ready to buy uploadify.