How to restrict content-types on direct upload from browser to S3 secured via pre-signed URL?
I am trying to generate an uplaod presigned url where frontend is required to send the content type of file.
I see that if fronend doesnt send this content type and i remove content type in params everything works fine,
but in bucket the object has type as blank white space no type mentioned.
so i thought while downloading or while getting the object through presignedurl and get it will give some error
but still everything works fine
only thing i can think of is we can use that content type in backend for validation and can limit uplaod to specific content type like images videos or something else?
Can anyone please explainthe real use case
Thankss.
Why is sending content type considered as good practice while generating an uplaod presignedURL with nodejs and aws-s3
I am trying to generate an uplaod presigned url where frontend is required to send the content type of file.
I see that if fronend doesnt send this content type and i remove content type in params everything works fine,
but in bucket the object has type as blank white space no type mentioned.
so i thought while downloading or while getting the object through presignedurl and get it will give some error
but still everything works fine
only thing i can think of is we can use that content type in backend for validation and can limit uplaod to specific content type like images videos or something else?
Can anyone please explainthe real use case
Thankss.