You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone.
I have an issue when trying to check for wrong mime-types, I have a simple function that checks if the mime-type is included in an array of mime-types, and responds with an 404 is type doesn't match, and otherwise I let formidable handle the file.
My issue is that if it is the wrong filetype, formidable still tries to upload the file, so I get;
TypeError: Cannotreadproperty'path'ofundefined
That error in turn kills the entire application, is there anyway to let formidable know that the file isn't suppose to be uploaded and just return the response?
You can find the whole project in here in this repo, repo:uploadz
The text was updated successfully, but these errors were encountered:
Hello everyone.
I have an issue when trying to check for wrong mime-types, I have a simple function that checks if the mime-type is included in an array of mime-types, and responds with an 404 is type doesn't match, and otherwise I let formidable handle the file.
My issue is that if it is the wrong filetype, formidable still tries to upload the file, so I get;
That error in turn kills the entire application, is there anyway to let formidable know that the file isn't suppose to be uploaded and just return the response?
You can find the whole project in here in this repo, repo:uploadz
The text was updated successfully, but these errors were encountered: