meinstein / react-file-picker

Sensible file input wrappers. Demo included.
19 stars 15 forks source link

"extensions" doesn't seem to do anything #9

Open LarsLiden opened 5 years ago

LarsLiden commented 5 years ago

I have a custom file type ".transcript" and I am using the following code:

<FilePicker extensions={['transcript']} onChange={this.onChangeFile} onError={(error: string) => this.props.setErrorDisplay(ErrorType.Error, error, "", null)} maxSize={300} >

When the file picker opens, it shows "all files":

image

pleacu commented 5 years ago

Any chance of adding support for accept? - i.e. accept=".gif,.jpg,.jpeg,.png,.doc,.docx" ref: <input type="file" accept=".gif,.jpg,.jpeg,.png,.doc,.docx">

deiv23 commented 4 years ago

I want only png files to appear. Extensions don't do nothing about it.