I am using NodeJS to upload a file to s3, and I am setting up the proper contentType for pdf while uploading. It looks something like this,
const params = {
Bucket: "noob_bucket",
Key: newFileName,
Body: fs.createReadStream(path),
ContentType: 'application/pdf',
ACL: 'private',
};
now the problem is when I am trying to show the pdfon browser using signed URL it is opening in browser only if the file size is approximately less then 25MB, else it is simply downloading the file.
Can anyone help me how to fix this issue. I have files that is > 50MB as well.
Please help me to fix this. Thanks in advance