#Form validations in Custom Upload Handler

1 messages · Page 1 of 1 (latest)

timid belfry
#

Should I do all my form validations in the custom upload handler? This includes form fields that are not files. I don't see an alternative because I need to upload the file to s3 before the other formData is available.

loud fable
#

You first upload the file then validate the values

timid belfry
#

What if validation of other values fails? Then I've just uploaded a file that's not attached to any schema.

loud fable
#

Delete it, or ignore it, S3 is cheap enough to ignore it but since you got the path after the upload you can delete it

timid belfry
#

Got it. Maybe I'm just trying to be too efficient.

timber lantern