4

I used dropzone as CSV/XLS file uploader. I use this option to filter and restrict CSV/XLS file:

acceptedFiles: "text/csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",

Now I just see XLS file in windows dialog box and doesn't see CSV file. Off course when I change filter drop-down to all files, I see CSV file and select it. But I wanna to method or option to solve this issue.

Do you have any solution for see both XLS/CSV files together?

Ehsan Ali
  • 1,362
  • 5
  • 25
  • 51

1 Answers1

5

Dropzone.js simply puts the values from the AcceptedFiles attribute directly into the html component.

<input accept="text/csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">

It looks like text/csv is not an accepted value even though it is a valid mime type. .csv is recommended.

See here HTML Input="file" Accept Attribute File Type (CSV).

Preston
  • 308
  • 6
  • 14