zefoy / ngx-dropzone-wrapper

Angular wrapper library for Dropzone
MIT License
174 stars 51 forks source link

add CSV extension to acceptedFile's list #35

Closed dlodeprojuicer closed 7 years ago

dlodeprojuicer commented 7 years ago

How do I configure the plugin to accept .csv files? Its working as expected if acceptedFiles: 'image/' I changed acceptedFiles to 'csv/', '.csv/*', '.csv' and 'csv' trying to make it work for CSV files but it is not working.

How do I change the config to accept CSV files?


  server: 'https://httpbin.org/post',
  maxFilesize: 50,
  acceptedFiles: 'csv'
};```
sconix commented 7 years ago

You need to figure out the correct mime type for the file. I think that csv is text/csv, but not sure.

dlodeprojuicer commented 7 years ago

@sconix text/csv worked, thank you.

tatsujb commented 6 years ago

for me text/csv dosen't. * doesn't either. same with text/*

I get : image

tatsujb commented 6 years ago

removing the acceptedFiles line from the config entirely fixed it for me.