zefoy / ngx-dropzone-wrapper

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

.rtf files are detected as application/msword #189

Open jamesbarrett95 opened 2 months ago

jamesbarrett95 commented 2 months ago

Issue:

When uploading a .rtf file, the mimeType is returned as application/msword. Could we change this?

As a workaround, I've done the following inside the callback function after a file is added:

if (file.name.toLowerCase().endsWith('.rtf')) {
  Object.defineProperty(file, 'type', {
    writable: true,
    value: 'application/rtf'
  });
}