I am using a Contact Form 7 which allows you to attach a PDF file to the message:


Chrome correctly shows a filter:


Firefox correctly shows a filter:


Internet Explorer also shows a filter:


But Microsoft Edge:


It is not setting a filter. Is this:

  • A bug with the Contact Form 7 plugin?
  • A bug with Microsoft Edge?

I do not have access to other desktop browsers, eg. Safari, to test.


Your Contact Form 7 is using accept=".pdf" on the file input HTML. This instructs browsers that know how, to only show files which have a file name matching the pattern. Ideally your contact form would also specify the PDF mime type which would give slighty wider browser support, especially on mobile: accept=".pdf,application/pdf". However, even that won't work with Microsoft Edge.

It is a known issue that Microsoft Edge doesn't really support the accept attribute for file input. In Microsoft Edge the All files (*) drop down contains the filter, but it is never selected by default. Users have to manually select it from the drop down to get the filter applied. Can I Use reports that Edge does not support this feature even though Microsoft Internet Explorer does.

On StackOverflow Limit file format when using <input type=“file”>? says that this is a browser client side feature that is easy to override or hack. If it is important that users can only upload PDF files, your server side controller needs to enforce that.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.