When using the aws-sdk npm plugin for nods.js, I can upload a pdf on 50kb with the following code (to AWS s3):
var params = {
Bucket: BUCKET,
Key: pdf_key,
Body: file,
ContentType: 'application/pdf'
};
var s3 = new AWS.S3();
s3.putObject(params, function(error, data) {
console.log(data);
console.log(error);
if (error) {
console.log(error);
callback(error, null);
} else {
callback(null, pdf_key);
}
});
But when uploading a 11mb pdf, even with specifying the ContentLength
, the upload just continues forever, even with a timeout of 2 minutes.
The question is how do I make aws s3 accept the large pdf file?
UPDATE
I have still not found any documentation or anwers for the question.
UPDATE 2
I will accept answers which show's this or another framework that can do this. I will need that framework to be able to also allow auth-read of the object.
UPDATE 3
I got it working for now but I haven't found a reason it shouldn't work.
Thanks in advance!