Copy link to clipboard
Copied
OK, I've scoured the web looking for someone who has seen this problem and no luck.
I am trying to do a cffileupload to give users the ability to easily upload multiple files. The flash interface comes up... I browse to 1 file, click the upload button and the progress bar moves until it shows it uploaded 1 file. The problem is I can't find the file anywhere especially in the directory I specifed. I've searched the entire server, I've looked for temp files that need to be renamed and moved, I've looked in the log files... nothing.
<cffileupload
url="process.cfm?pro_num=#pro_num#"
progressbar= "true"
title="Upload Closeout Pictures"
wmode="transparent" />
process.cfm
<cfset path = #file_path# & "\" & #url.pro_num# >
<cffile
action="upload"
destination="#path#"
nameconflict="overwrite" /
Any help would save the last of my hair!
Thanks.
Robin
Copy link to clipboard
Copied
The action attribute value on your CFFILE tag should be changed to "uploadall" in order to support multiple files. If this does not help please post more complete code samples.
Copy link to clipboard
Copied
I had the action set to uploadall previously but tried it again just to be safe. Same result - it shows a successful upload but no file exists. I don't have anymore code to post - literally that is all there is.
Thanks.
Copy link to clipboard
Copied
What do your web server logs record? Is anything being uploaded (and possibly failing)? Does your web server have any security options, such as URLScan (for Windows IIS) that might be preventing file uploads?
Copy link to clipboard
Copied
What is contained in a dump of the CFFILE result variable?
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7388.html
Copy link to clipboard
Copied
I can never get anything to show on the process.cfm page. I put output tags and they never run so I put the cfdump tag and nothing happens - it stays on the flash file upload wizard.
Robin
Copy link to clipboard
Copied
The file upload does not occur via traditional form posts for CFFILEUPLOAD. Rather than use CFDUMP try CFLOG to dump the result of the cffile somewhere where it can be examined.
If your process.cfm is never used (there should be a POST to this page in your web logs), then it probably means the files are not being sent to the server. I would verify that any scripts/flash files required by CFFILEUPLOAD are in place and accessible to the browser.
You might also try the sample code from the documentation that uses JavaScript to give the browser feedback about the upload process.
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSe9cbe5cf462523a0fe521c212308a43ca3-7ffe
Copy link to clipboard
Copied
The javascript example never fires just like all the other functions/tags I put into process.cfm after the cffile tag. I tried logging using cflog and it does report an error but doesn't say what the error is - just error. Is there a variable I should use that would contain the error message?
Copy link to clipboard
Copied
If the JavaScript doesn't "fire" I suspect that process.cfm page is either failing or not being called at all.
Things to check:
1. The contents of the cffile result variable.
2. Put a try/catch around the cffile and see any exceptions are thrown. Examine the exception error message for any information.
3. Have you posted all of your code?
Copy link to clipboard
Copied
It shouldn't be this hard. Thanks for the help but this is wasting too much time... I'm moving on.
Copy link to clipboard
Copied
I had hard time with this as well while trying to ad it to a shopping cart admin section.
The problem was that the SESSION gets lost and if u don't pass the urltoken, the cf don’t see the login and fail the process (this was on my app).
I don’t know what you are using it for, but if its on a HAVE TO BE LOGEDIN first page, this is where you bug is.
So try adding this : url="youruplaodfile.cfm?#urlEncodedFormat(session.urltoken)#"
To your code and see if it works
One more thing on your SAVE page, add this to make sure your directory exists before u save the file into it :
<!--- check if dosnt exists, cretae --->
<cfif Not DirectoryExists(_ProductFolderPath)>
<cfdirectory action = "create" directory = "#_ProductFolderPath#" >
</cfif>
Find more inspiration, events, and resources on the new Adobe Community
Explore Now