cffile + Win IE issues

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

  1. #1

    Default cffile + Win IE issues

    I've built a form where the visitor inputs a bit of copy into a text area,
    answers a couple of questions, browses their computer for an image to upload,
    then hits submit. The data goes into a MySQL db and the image should be written
    to a particular directory on the server. Now, I've tested this on several
    browsers on both Mac and Windows platforms and it works perfectly except for a
    Windows computer (XP and 2000) running IE. Of course I've been told by the
    hosting company that they've got the latest patches so it can't be them. The
    site is being hosted on a UNIX computer running CF MX. Any thoughts what could
    be causing this or how I could fix it? I don't have administrative access to
    the CF server and the form uses <cffile> to perform the file upload. Thanks in
    advance, Rob

    etman Guest

  2. Similar Questions and Discussions

    1. CFFILE ISSUES
      Cant write new files with cffile without leaving first line blank!! I am trying to write an application that would read data from a database into...
    2. cffile with flv
      I need to set the file to allow uploading of an flv file into an Access database. How do I do this. I know it's using the accept parameter, but what...
    3. USING CFFILE
      I am appending data from query to text file.The number of records appended approximately are about 35000 records.I wrote the code in the format...
    4. need help with cffile
      I am having some trouble with cffile - i am trying to uplaoad a few files in a form and rename them to be inserted into the database - the problem...
    5. CFFILE on PC and Mac
      So I've been looking at the suggested solution mentioned by Fug. It looks like it might work, but it is 400+ lines of code and will take a bit of...
  3. #2

    Default Re: cffile + Win IE issues

    Is the form field value different on IE than the other browsers? Anything in the log files? I'm assuming that the directory is the same for all of the browsers/OS right?
    Mike Greider Guest

  4. #3

    Default Re: cffile + Win IE issues

    Other things to look at in addition to Mikes advice:

    1. Is it a specific computer/s having the problem (I know you said a Win2K/XP
    system, but are there other Win2K/XP systems you've tested on that work fine,
    or is it every Win2K/XP system you've tested has the problem?)
    2. Is the page generating an error (and if so, what is it) or does it appear
    to work, even though the file has not been uploaded?

    Fug Guest

  5. #4

    Default Re: cffile + Win IE issues

    Well, here's what I've found so far: The site works for every other browser
    and OS that I've been able to test - EXCEPT for Windows (I've only tested XP)
    running IE. I've also been able to narrow it down to the property call
    (withing the <cffile> tag) to #cffile.serverFile#; or any other property call
    within <cffile>. I've tried moving the #cffile.serverFile# property call to
    different parts of the page and I'll get a CF error thrown that says that
    #cffile.serverFile# is undefined - it's as though it tries to query the server
    before the file has been uploaded. The reason I'm calling #cffile.serverFile#
    is because I'm trying to add the file name that's been uploaded to the server
    into a db so I can relate the to at a later date. Very odd...

    etman Guest

  6. #5

    Default Re: cffile + Win IE issues

    Found it. When specifying the image types to allow within the <cffile> tag,
    here's what I put: <cffile action='upload' fileField='upload'
    destination='#ContentImagesDestination#' nameConflict='makeunique'
    accept='image/jpg, image/jpeg'> However, the accept= should have been:
    <cffile action='upload' fileField='upload'
    destination='#ContentImagesDestination#' nameConflict='makeunique'
    accept='image/*'> I was trying to limit what could be uploaded to JPGs only -
    but for some reason IE on a Win box is a bully and seems to not like being
    limited to a specific file extension; only a file type. I hope this helps
    someone else that may run into this problem...

    etman Guest

  7. #6

    Default Re: CFC accessor method inserting carriage returns

    Further updates - the database interaction is irrelevant. The following also
    produces the carriage return when calling an accessor method to obtain the data
    within CFOUTPUT. Also the CFPROESSINGDIRECTIVE tag used to suppress white
    space does not help.

    <cfscript>
    myuserBean = createObject("component",
    "#COMPONENT_URL#.gov.nasa.user_bean");

    myuserBean.setFirstName("Cory");
    myuserBean.setLastName("Phillips");
    </cfscript>

    View HTML source to see the results.
    <cfoutput>
    Before[#myuserBean.getLastName()#]After
    </cfoutput>

    --------- Result -------
    Before[
    Phillips]After

    Cory P. Guest

  8. #7

    Default Re: How to make programmatically entry in IIS

    Hitesh, You can use WMI through scripting to manipulate IIS objects and
    properties. See
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/01c[/url]
    2ecf3-01d6-44d3-889b-339542d3339c.asp for details.

    philh Guest

  9. #8

    Default Re: CFC accessor method inserting carriage returns

    Add output="No" to this line:
    <cffunction name="getLastName" returntype="string" access="public">

    making it:
    <cffunction name="getLastName" returntype="string" access="public" output="no">

    This flag indicates whether output from this function is to be processed as
    HTML or hidden as if the function ran in the body of a <cfsilent> tag.

    Kronin555 Guest

  10. #9

    Default Re: CFC accessor method inserting carriage returns

    Thanks Kronin. That fixed it.
    Cory P. Guest

  11. #10

    Default Re: cffile + Win IE issues

    That's an interesting find. Thanks for the update.
    Mike Greider 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