<input> accept Attribute in Microsoft Edge
Asked Answered
C

2

37

Anyone know how to get accept working in Edge?

<input type="file" accept=".csv">

Works fine in Chrome 44, Firefox 39, IE 11, Opera 31.

Also tried

<input type="file" accept=".csv,text/csv">

Corinecorinna answered 7/8, 2015 at 10:32 Comment(3)
In what way is it not working? It is functioning fine for meDampproof
Really? Odd. My file choices when accept=".csv" in MS Edge only.Corinecorinna
Does anyone know of a workaround? I think at this point (3 years after alerting MS about the issue) we can assume they will not fix it. But many people still need a workaround.Charger
H
11

As @mparizeau reported, @JoeHealy's answr is about HTTP Accept header, which is not what the question is about.

To answer the question: at the moment, Edge does not support accept on <input type="file" />.

There used to be a bug tracker here, now it's just a SO redirected search -_-. Anyway, with the upcoming new Microsft Edge (Chromium) this issue will be resolved.

Happenstance answered 18/8, 2017 at 9:24 Comment(0)
F
27

"accept" attributes are definitely not supported in Microsoft Edge at this point. I confirmed your behavior as "no go" in edge, but showing up in IE via the [...] thing in the upper right of Edge.

The Edge status shows it as "Under Consideration" with just 198 votes at https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/13661175-full-spec-support-for-accept-in-input-type-file .

If you're interested in implementation of the HTTP Client Hints (aka "accept") on Edge be sure and vote it up at the URL above.

Fluidics answered 25/8, 2015 at 21:46 Comment(9)
Hi, Any update on this? I'm trying with accept="video/*" OR accept="pdf/*" and it still shows as "All Files" and not filtering. Under latest stable version from Microsoft (20.10240.16384.0 )Ozonide
still viewed as 'under consideration', no timeline. vote it up?Fluidics
I might be wrong but I don't think HTTP client hints is the feature that the question is referring to. I think it's this feature caniuse.com/#feat=input-file-accept which Edge supposedly supports. I can reproduce the issue as well and it should probably be reported as a bug here connect.microsoft.com/IE/FeedbackIsochromatic
Where'd you find the doc that edge supports them on a Microsoft site? Dug around but can't find it.Fluidics
Fwiw, the second among the list of alternative feedback conduits takes you to a page where you can vote in favor of the accept attribute support. Note that this resource specifically addresses web developers (imho incomprehensible, whether this features proves useful only depends on the end user preference and her file system organisation).Shelbyshelden
It does not address the question: author is asking about accept html property. Not the Accept http header.Happenstance
This link developer.microsoft.com/en-us/microsoft-edge/platform/issues/… suggests that it's being tracked. According to caniuse.com/#feat=input-file-accept Egde will not support this any time soon. Hopefully they will fix this either way.Labret
This is still not supported in Edge. Only 22 votes left to go.Reece
As of now, Dec 2020, this appears to be supported on Edge. I'm looking here, as @Isochromatic mentioned: caniuse.com/#feat=input-file-acceptBoykin
H
11

As @mparizeau reported, @JoeHealy's answr is about HTTP Accept header, which is not what the question is about.

To answer the question: at the moment, Edge does not support accept on <input type="file" />.

There used to be a bug tracker here, now it's just a SO redirected search -_-. Anyway, with the upcoming new Microsft Edge (Chromium) this issue will be resolved.

Happenstance answered 18/8, 2017 at 9:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.