5 Replies Latest reply on Jun 15, 2006 11:45 AM by coderWil

    Firefox issue

    Level 1
      I got a file browse in my project.
      <input type="file" name="frm_file" value="" size="100">

      When i open project in firefox, filename only inserted in db.

      In IE, path and filename are inserted to db.

      Why "input type="file" " is working different in firefox?. What is solution to fix this problem?.
        • 1. Re: Firefox issue
          Kronin555 Level 1
          Are you doing a <cffile action="upload"...> anywhere between when the user submits that form and before your database insert?
          • 2. Firefox issue
            Level 1

            I just need user selected path and filename. No need to upload file.

            I am using this code.
            <input type="file" name="frm_file" value="" size="100">

            in insert query, i use frm_file to insert path and filename.

            In IE, filename and pathname is inserted to db.
            In firefox, filename is inserted, path is missing. How to get path in firefox?

            • 3. Re: Firefox issue
              Kronin555 Level 1
              If you don't need them to upload the file, then don't use a file input type. That's the whole point of a file input type.
              • 4. Re: Firefox issue
                Level 1
                Users want to browse and pick the file name. How will i give a browse feature, if i am not using input=file?.
                • 5. Re: Firefox issue
                  coderWil Level 1
                  You are dealing with a security 'sand box' issue. FF correctly keeps from the server the exact location of the file on the users hard drive, since the theory is that this information can be used to 'hack' the users computer in the future. IE is using an 'unsafe' method.

                  Kronin555 is correct. The only good use for the type="file" is in conjuction with upload code. I am sure you will find that the other browsers all pass dis-similar information from that field, as they all have different concepts of security.