cfform file upload problem in MSIE

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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'>...
    2. File Upload Problem
      i have the same problem.
    3. 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'...
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

  7. #6

    Default 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

  8. #7

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139