C
C#2y ago
Simo

❔ 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
Angius
Angius2y ago
Well, yes, the file has to get to the server first so that it can be validated Do some client-side validation
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server