Closed jleuth closed 8 months ago
I found a bug where if you allow any item instead of certain filetype(s) it will not show the filename to be uploaded.
Using code: `<FileUpload maxFileSize={26214400} accept="audio/mp3,audio/mp4,audio/mpeg,audio/mpga,audio/m4a,audio/wav,audio/webm" {...rest} onFilesChange={(files) => { if (files.acceptedFiles?.length) { onChange(files.acceptedFiles[0]) } }} maxFiles={1} inputRef={ref}
`
Using code: `<FileUpload maxFileSize={26214400} accept="*" {...rest} onFilesChange={(files) => { if (files.acceptedFiles?.length) { onChange(files.acceptedFiles[0]) } }} maxFiles={1} inputRef={ref}
As you can see, when a file is ready to be uploaded, nothing is shown.
SUI-384 FileUpload component doesnt show filename if accept = "*"
Nevermind, I'm an idiot. I didn't know it had to be "/" instead of just ""
I found a bug where if you allow any item instead of certain filetype(s) it will not show the filename to be uploaded.
Using code: `<FileUpload maxFileSize={26214400} accept="audio/mp3,audio/mp4,audio/mpeg,audio/mpga,audio/m4a,audio/wav,audio/webm" {...rest} onFilesChange={(files) => { if (files.acceptedFiles?.length) { onChange(files.acceptedFiles[0]) } }} maxFiles={1} inputRef={ref}
Using code: `<FileUpload maxFileSize={26214400} accept="*" {...rest} onFilesChange={(files) => { if (files.acceptedFiles?.length) { onChange(files.acceptedFiles[0]) } }} maxFiles={1} inputRef={ref}
As you can see, when a file is ready to be uploaded, nothing is shown.