❔ Handling invalid uploads
If I make a controller, which accepts a file upload POST, which only accepts pdf.
if someone uploads a .docx for example, and I throw the error, does this error get thrown only after the entire file is uploaded anyway? i.e. its a bit silly because they wasted their time uploading the file only to receive an error?
2 Replies