valor-software / ng2-file-upload

Easy to use Angular components for files upload
http://valor-software.github.io/ng2-file-upload/
MIT License
1.91k stars 661 forks source link

Not getting MIME type of JSON file #424

Open Libu-Mathew opened 8 years ago

Libu-Mathew commented 8 years ago

Not getting mime type of JSON file. I just use the below code to print the file details

this.uploader.onAfterAddingFile = (item => {
   console.log(item)
});

I only want to allow excel, csv & json files in the uploader. So i just set 'allowedMimeType'

public uploader:FileUploader = new FileUploader({
      url: apiEmailUploaderUrl,
      allowedMimeType: [
          'text/csv',
          'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
          'application/octet-stream',
          'application/json',
          'text/json',
          'text/x-json',
          'text/javascript'
      ],
      queueLimit: 5
});

But when i upload json file , due to type='' uploader blocking the request. Please help me.

meirongding commented 4 years ago

any update for this topic?