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
It seems to me that if I'd like to use this library to manage file uploads with other form inputs in my React Router 7 app, I could have many uploaded files if the user fails even simple request validations, because:
I need to parse the form data first
During that, files are uploaded to my storage
After that, I get access to the form-data
And only then can I actually validate the form data
So say I have a form with a field using some custom validation and a file input. If the user sends some invalid data for the other field, and keeps messing up, on each attempt I'm going to upload that file to my storage.
Are there any best practices on how to avoid this? Or am I just missing something?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
It seems to me that if I'd like to use this library to manage file uploads with other form inputs in my React Router 7 app, I could have many uploaded files if the user fails even simple request validations, because:
So say I have a form with a field using some custom validation and a file input. If the user sends some invalid data for the other field, and keeps messing up, on each attempt I'm going to upload that file to my storage.
Are there any best practices on how to avoid this? Or am I just missing something?
Beta Was this translation helpful? Give feedback.
All reactions