Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to uplaod more thn 6 mb PDF file #48

Closed
hitubansal123 opened this issue Oct 5, 2015 · 0 comments
Closed

Trying to uplaod more thn 6 mb PDF file #48

hitubansal123 opened this issue Oct 5, 2015 · 0 comments

Comments

@hitubansal123
Copy link

Hello

I am trying to upload pdf file having size 6 mb. it shows upload sucessfully, but when i go to s3 the size is 5 mb. and file is not opening.

Here is my code

var Uploader = require('s3-streaming-upload').Uploader,
 upload = null;
//this function will upload the file to s3
exports.uploadFile = function (fileReadStream, filename, awsHeader, cb) {

    //set options for the streaming module


upload = new Uploader({
  // credentials to access AWS
  accessKey:  config.aws.accessKey,
  secretKey:  config.aws.secretKey,
  bucket:     'bibliohivepdf',
  objectName: "pdf1/"+filename,
  stream:     fileReadStream,
  objectParams: {
    ACL: 'public-read'
  },
  debug:      true
});

upload.send(function (err) {
  if (err) {
    console.log("Errro"+err);
    console.error('Upload error' + err);
  } else {
   console.log("Sucessfull");
  }
});


};
@abtris abtris closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants