I use filereader for upload image. I Wrote a check to determine the type of file. I want allow download only images type. But it does not work correctly. Can someone help?
there are my code
if (file.type) {
var photoType = /image.*/;
if (file.type !== photoType) {
callback(
null,
"File not supported! Try to upload another image"
);
return;
}
}