Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

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)

  • 2 ответа
  • 11 имеют эту проблему
  • 1 просмотр
  • Последний ответ от Roy Shoa

more options

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.

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.

Выбранное решение

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?

Прочитайте этот ответ в контексте 👍 2

Все ответы (2)

more options

Выбранное решение

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?

more options

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.