• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Firefox issue

Explorer ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

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?.
TOPICS
Advanced techniques

Views

333

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

Are you doing a <cffile action="upload"...> anywhere between when the user submits that form and before your database insert?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

No.

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

Users want to browse and pick the file name. How will i give a browse feature, if i am not using input=file?.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 15, 2006 Jun 15, 2006

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation