X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

When using a custom accept attribute on a input file its show all the files instead of the files that i choose (accept="image/jpeg,image/gif,image/png,imag)

Posted

Hi, I am trying to use the accept file input for limit the file type that a user can choose when uploading a file. actually i have two problems that i can not figure our:

 1. If i am using the value "image/*" its limit the user to all the images but if i am using a custom 
     limit e.g. "image/jpeg,image/gif,image/png,image/bmp" its show all the limits in the select box but the 
     default value for ths user is "All Files". In Chrome and IE10 its working as needed.
 2. When i am trying to limit to "swf" files using the value "application/x-shockwave-flash" its show "All Files".
     In Chrome and IE10 its working as needed.

I am using Windows 7.

Thanks.

Chosen solution

Well, it seems you are doing what it says in the documentation: https://developer.mozilla.org/en-US/docs/HTML/Element/Input#attr-accept

Will Firefox actually let you submit a file that isn't on the list? In other words, is the problem the accept is ignored, or that the dialog isn't displaying the filter?

Have you had a chance to search for any open bugs in Bugzilla?

Read this answer in context 2

Additional System Details

Installed Plug-ins

  • Shockwave Flash 11.6 r602
  • Next Generation Java Plug-in 10.17.2 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Google Update
  • 5.1.20125.0
  • NVIDIA 3D Vision plugin for Mozilla browsers
  • NVIDIA 3D Vision Streaming plugin for Mozilla browsers
  • Shockwave Flash 9.0 r45

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0

More Information

jscher2000
  • Top 10 Contributor
2349 solutions 20824 answers

Chosen Solution

Well, it seems you are doing what it says in the documentation: https://developer.mozilla.org/en-US/docs/HTML/Element/Input#attr-accept

Will Firefox actually let you submit a file that isn't on the list? In other words, is the problem the accept is ignored, or that the dialog isn't displaying the filter?

Have you had a chance to search for any open bugs in Bugzilla?

Question owner

Hi, The Firefox select the "All Files" by default but if i click on the filter select box in the upload files window i can see all the filters that i made *.jpg,*.png and so on. The problem is that its need to select the filters by default.

Anyway i search it and this is the bug reported: https://bugzilla.mozilla.org/show_bug.cgi?id=826176

Chrome,IE10 and Opera are working correctly.

Thanks for your answer.