Ask a Question related to Macromedia ColdFusion, Design and Development.
-
TanzMatias #1
ERROR: The form field "theFile" did not contain a file.
I'm getting this error when a user uploads a file. (I do have
ENCTYPE="multipart/form-data" in the form definition.) If the user tries to
upload a file that already exists, I would like him to be able to choose
whether or not the file gets overwritten. The first page displayed to the user
has the input field:
<INPUT TYPE="FILE" NAME="theFile">
When the user hits submit, CF discovers that the file already exists. What I
would like to do is display the second page to the user with the file
attempting to upload asking if he wishes to overwrite the alredy existing file.
What I'm running into, is that I can't seem to upload a file with using
TYPE="FILE" input field. On this second page I CANNOT use a TYPE="HIDDEN"
VALUE="#theFile#" field, or assign the already chosen file in TYPE="FILE"
VALUE="#theFile#" b/c you cannot use the VALUE attribute.
Any ideas or suggestions??
Thanks!!
TanzMatias Guest
-
"select into outfile" command with field names as the first lineof the file
Hi all ;) The question is in the subject. I had a look in the export_option but nothing appeared. I don't want to use a sophisticated tool to do... -
Acrobat Form Submit error: changes VALUE="true" to "0"
I wrote an HTML page with a form. In the form I had many inputs as in: <INPUT TYPE="radio" NAME="Q1" VALUE="true"> and <INPUT TYPE="radio"... -
Compare 2 fields & delete everything in "field 2" that occurs in "field 1"
Is it possible to compare 2 fields and delete everything in "field 2" that also occurs in "field 1" ? FIELD1 800-555-1212 for... -
Request.Form("Field Name") Versus Request.QueryString("Field Name")
I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the... -
dr("field").toString returns "400.0000" instead of "400"
I have just installed VS.NET 2003 on my computer. I have a project that I have been developing on VS.NET 2002. I haven't upgraded this project to... -
SafariTECH #2
Re: ERROR: The form field "theFile" did not contain afile.
you'll have to ask them in the first form what they want to happen before
submitting - CF doesn't know the file exists before it goes back server side,
nor can it arbitrarily make decisions after the fact - you have to tell it how
to handle the file before submitting to the server.
it may take a little thought, but you could submit the file using MAKEUNIQUE
on the nameconflict, pull the status result to see if it renamed it or not (and
what name it used if it did), give them the option to supply a different name,
overwrite, or cancel the upload, then rename the temp file if they choose a new
name (after verifying that the file name still does not exist - you may end up
with a loop here), delete the current file and rename the new file to act as an
overwrite, or delete the uploaded file if they cancel it.
JMO
SafariTECH Guest
-
Stressed_Simon #3
Re: ERROR: The form field "theFile" did not contain afile.
You can set the nameConflict="Error" in the cffile for the upload then wrap
that in a cftry block and create a temp file in the cfcatch.
Then cfinclude a page that asks the relevant questions. If they want to
overwrite it then do it. If not delete it.
However, bear in mind that you might end up with 'ownerless files' that you
might want to clear out using cfschedule.
Your call.
Stressed_Simon Guest



Reply With Quote

