Thursday, 20 April 2017

Uploading Large Files on AWS S3 bucket

I am trying to upload large files(PDFs, Videos) through my angular web app to AWS s3 bucket. i am using ng-file-upload for uploading file to my node server,and on node i am using multer-s3 npm package.

For small files it is working great as expected. but I am not able to upload large files using. It is not giving me any error as well. It just doesn't upload the file(if it is large), doesn't even enters the callback and gets timeout. Any way to handle uploading large files to s3 Bucket?

var uploadSingle = upload.single('uploadFile');

router.post('/uploadVideo',function(req,res,next){  
    uploadSingle(req,res,function(err){
                // doesn't come here if the file is large
            if(err){
                //Error Response , Error while uploading Module PDF;
            }
            else{
                //handling file upload
               // success response
            }
    });
}

If anyone can help me solve this issue, its greatly appreciated. If you know other libraries which can help me upload large files on AWS s3 bucket, please suggest.



via Ravi Shankar

No comments:

Post a Comment