jamhall/s3rver

Error when object has no content-type

Closed this issue · 0 comments

If you request a resource that has no content-type stored in its .dummys3_metadata the server throws an unhandled error.

AWS fallsback to the binary/octet-stream content-type when there is none specified (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html).

If you upload a file to s3 via the web interface it guesses the correct file type.

This issue occurs if you do a PUT operation using node-fetch or curl without specifying the Content-Type header.