I'm using the new file functions from CF8 to upload files in order to avoid the out of memory problems caused by CFFILE. It works fine if I know the file type that is being uploaded as I rename the files anyway.
But now I have a need to upload files of unknown types. With CFFILE there was no problem - the tag captured the original name of the file (as opposed to the temporary name) and saved it with the correct name and extension.
<CFFILE
ACTION="upload"
FILEFIELD="#FORM.fileFieldName#"
NAMECONFLICT="makeunique"
DESTINATION="#SomePath#">
So with an HTML input control with the attribute type="file" if I browse my computer and select "xyz.pdf" to upload - when you look at the form value it actually shows something like "C:\ColdFusion8\runtime\servers\coldfusion\SERVER-INF\temp\ instead.
CFFILE saved the file with the original name. Using fileCopy my file gets saved as neotmp48974.tmp.
Thoughts?
How do I get the original file name from the html form element rather than the temp file name?
Thanks!
But now I have a need to upload files of unknown types. With CFFILE there was no problem - the tag captured the original name of the file (as opposed to the temporary name) and saved it with the correct name and extension.
<CFFILE
ACTION="upload"
FILEFIELD="#FORM.fileFieldName#"
NAMECONFLICT="makeunique"
DESTINATION="#SomePath#">
So with an HTML input control with the attribute type="file" if I browse my computer and select "xyz.pdf" to upload - when you look at the form value it actually shows something like "C:\ColdFusion8\runtime\servers\coldfusion\SERVER-INF\temp\ instead.
CFFILE saved the file with the original name. Using fileCopy my file gets saved as neotmp48974.tmp.
Thoughts?
How do I get the original file name from the html form element rather than the temp file name?
Thanks!