Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.rtf files are detected as application/msword #189

Open
jamesbarrett95 opened this issue Jul 25, 2024 · 0 comments
Open

.rtf files are detected as application/msword #189

jamesbarrett95 opened this issue Jul 25, 2024 · 0 comments

Comments

@jamesbarrett95
Copy link

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'
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant