Not getting MIME type of JSON file #424

Open
opened 2016-09-28 13:33:45 +00:00 by Libu-Mathew · 1 comment
Libu-Mathew commented 2016-09-28 13:33:45 +00:00 (Migrated from github.com)

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.

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 2020-03-31 04:35:17 +00:00 (Migrated from github.com)

any update for this topic?

any update for this topic?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#424