Question
Passing hidden input type file through pages
I have a form where there is a form field type file. If I
browse and pick the file and post it to next page I m not able to
retrieve it as hidden type in form. I try to post that form againa
and the error I m getting is " The form field "logo" did not
contain a file.".
The way I m trying to get the file field is like this:
<cfif #form.logo# neq ''>
<input type="hidden" name="logo" value="#form.logo#" />
</cfif>
where form.logo is <input type="file" name="logo" /> in the page where it is posted from.
Now I want to post the form to another page keeping that logo file and upload it to folder and putting the path in database using:
<cfif isdefined("form.logo")>
<cffile ACTION="UPLOAD" FILEFIELD="logo" DESTINATION="W:\BCHRMA\bchrma-site\content\postjobs\uploadedlogo\" nameconflict="overwrite">
This gives an error "The form field "logo" did not contain a file.". Please help if anyone has a solution around it.
Thankyou
The way I m trying to get the file field is like this:
<cfif #form.logo# neq ''>
<input type="hidden" name="logo" value="#form.logo#" />
</cfif>
where form.logo is <input type="file" name="logo" /> in the page where it is posted from.
Now I want to post the form to another page keeping that logo file and upload it to folder and putting the path in database using:
<cfif isdefined("form.logo")>
<cffile ACTION="UPLOAD" FILEFIELD="logo" DESTINATION="W:\BCHRMA\bchrma-site\content\postjobs\uploadedlogo\" nameconflict="overwrite">
This gives an error "The form field "logo" did not contain a file.". Please help if anyone has a solution around it.
Thankyou
