I am a newb to react and was trying to find a function to check for specific file format type(mp4,flv,,ect) when ever i upload something using react besides using dropzone?
2 Answers
You can add the accept="" attribute to your <input type="file"> to allow the user to only select files of a certain type.
For instance,
<input type="file" accept="video/*">
will accept all video, and
<input type="file" accept=".mp4,.flv">
will accept files with those extensions.