Allow specific file formats using the upload component

I need to allow only specific file types to be uploaded using the upload component. Using the “accept” argument, I am only able to pass 1 file extension. I need to allow 3 types only: ‘.pdf’, ‘.jpg’, and ‘.png’.

Hi and welcome to the Dash Community :slight_smile:
Yeah you are right dcc.Upload component currently only allows to have a single accepted file type.
Although you can use the dash uploader component built by @np8. It allows to pass a list of accepted file types. See the docs here.

1 Like

Hello, and thanks for the warm welcome :smile:.
Looking forward to try this out. And thanks to @np8 for the component!

1 Like