react-component / upload

React Upload
https://upload.react-component.vercel.app/
MIT License
785 stars 319 forks source link

When upload a file whose extension is jpeg but actually it is json file, the file.type is still jpeg. #193

Open JingyeHou opened 5 years ago

JingyeHou commented 5 years ago

mare-animal-nature-ride-45164 (1)

JingyeHou commented 5 years ago

can we add more accurate MimeType checking so that we can know that file is json?

thomb commented 5 years ago

Specifically this in reference to https://github.com/react-component/upload/blob/master/src/attr-accept.js

In this file the file extension is preferred over direct mimeType. It would be preferable to have the actual mimetype checked instead.