I upload a pdf
blob
object to S3
const params = {
Bucket: "poster-print-bucket",
Key: Date.now().toString() + ".pdf",
Body: blob,
contentType: "application/pdf",
};
const uploaded = await S3.upload(params).promise();
When I open a url which is i.e https://poster-print-bucket.s3.ca-central-1.amazonaws.com/1633526785678.pdf It downloads me a blank pdf
I thought maybe my blob
is corrupted or something but I managed to upload same blob
to firebase storage just fine.
btw I'm using nextjs api/upload-poster
route
What's happening?