Jaaneek / useFilePicker

Simple react hook to open browser file selector.

Home Page:https://use-file-picker.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept parameter should not pass "*" to input

Jaaneek opened this issue · comments

https://html.spec.whatwg.org/multipage/input.html#attr-input-accept

Input does not handle accept="*", we are currently passing it there and so far it works on every browser, but it's not documented and might be changed in the future.

I guess something like

If(accept !== "*")
input.accept = accept 

Should work

@Jaaneek Where would you like to put that code?

Done, deployed