Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jSteen #1
cfform file upload problem in MSIE
I've been searching all over for this, but can't seem to find anything at all.
I have a form that intakes product info along with an img file (jpg) of that
product. the form is working great on every browser I have tried with the
exception of MS Internet Explorer on a PC. It seems as though the input
type="file" tag is not passing any information along to the server so nothing
is being uploaded.
Not exactly sure if this has to do with CF & MSIE in combination or if it's
just MSIE, or if I am totally off base. Just really desperate to find an
answer!
Anyone have any ideas? I have tried everything I can think of with no
succcess...
Thanks,
Jon
jSteen Guest
-
cfform file upload
Does anyone have any idea how to make a cfform format='flash' display a file input box? I've tried: <cfintput type='file' name='Attachment1'>... -
File Upload Problem
i have the same problem. -
File upload problem with CF7
I am getting a strange error when I am trying to upload a file to cf7. My code is below: <form action='index.cfm?fa=pub.welcome' method='post'... -
File Upload Problem - nothing in /tmp
My PHP.ini file sets the following: file_uploads = on upload_max_filesize = 3M upload_tmp_dir = /tmp When I try and upload the file, it... -
PHP file upload problem
Hi all, Heres a strange problem i am running into running Php4.2.2. I am uploading a file using a post and when i receive the file on my share... -
Stressed_Simon #2
Re: cfform file upload problem in MSIE
I have had problems in the past with Apple Macs as for some reason they add
loads of white space onto the beginning and end of the filename and so the file
cannot be found. I got round it using the following:-
<cfset FORM.FileField = UCase(Trim(FORM.FileField))>
Not sure if that is your problem but worth a look!
Stressed_Simon Guest
-
kim il sung #3
Re: cfform file upload problem in MSIE
simple example of file upload form page
<form action="action.cfm" method="post" enctype="multipart/form-data"
name="myform" id="myform">
file field:<br>
<input type="file" name="myfile" size="50"><br>
<input type="submit" name="submit">
</form>
cheers
kim
kim il sung Guest
-
jSteen #4
Re: cfform file upload problem in MSIE
Thanks for the effort, but didn't fix the problem.
The form works perfectly in firefox PC, firefox Mac and Safari Mac. The
server returns an error message telling me that 'the form field "ul_path" did
not contain a file' when the file is being uploaded from MS Internet Explorer
(PC version) I haven't tested on MSIE mac, but since the page is closed to
public view I have a good idea of what it needs to support - unfortunately the
main one is MSIE PC...
Thanks again.
jon
jSteen Guest
-
kim il sung #5
Re: cfform file upload problem in MSIE
try my example, you could also tee more about cf server and this client pc.
any proxy, antivir, autentication, etc between client & server, what lang
client pc system has.
you also could use some other name than file in your file field.
try my code, sence it does contain only one field and logic to this field.
save to you web server this simple example of file upload form page and
attached code at your choise of name.
cheers kim
<!--- is file field existing in form scope? --->
<cfif IsDefined("myfile")>
<cftry>
<cffile action="UPLOAD" filefield="#Trim(myfile)#" destination="C:\foobar\"
nameconflict="MAKEUNIQUE">
<cfcatch type="Any">
<cfthrow message="file was not saved" type="myerr" extendedinfo="error
occured while saving file to disk.">
</cfcatch>
<cfabort>
</cftry>
<cfif cffile.FileWasSaved is 0>
<!--- file wasnt saved --->
<cfif cffile.FileExisted is 1>
<cfthrow message="file was not saved" type="myerr" extendedinfo="file
allready existing.">
<cfelse>
<cfthrow message="file was not saved" type="myerr" extendedinfo="unknown
reason, file wasnt existing allready.">
</cfif>
<cfelse>
<!--- file was saved successfully --->
file is saved succesfully in directory [cffile.ServerDirectory#] with name
[#cffile.ServerFile#}
</cfif>
<cfelse>
<h1>you didnt give me any file to download.</h1>
possible reasons are:<br>
not valid file type (iis url scan monitor)<br>
too big file size (iis url scan monitor)<br>
invalid field name<br>
file name does not have extension<br>
file name not valid<br>
this server uses ssl (?)<br>
too many form fields, so information from form was cutted to xxx bytes<br>
this server cannot handle your character set<br>
sending stuff via web form is limited by client firewall/proxy/content
scanner etc..<br>
dump from form scope:<br>
<cfdump var="#form#" label="form scope dump">
</cfif>
kim il sung Guest
-
MDT_CMH #6
Re: cfform file upload problem in MSIE
Make sure you have enctype="multipart/form-data" in the input tag. If not nothing will be uploaded.
MDT_CMH Guest
-
Jim Eisenhauer #7
Re: cfform file upload problem in MSIE
This is nothing but an MSIE issue.
The quick fix is to add "image/pjpeg" to your list of the 'accept=' parameter on your cffile tag.Jim Eisenhauer Guest



Reply With Quote

