amazon web services - AWS javascript SDK multiple file upload progress bar -


i can upload files s3. want progress loaded in each file.

bucket.upload(params, function(err, data){    console.log("file uploaded successfully"); }).on('httpuploadprogress', function(progress){    console.log(progress.loaded / progress.total * 100);} 

the problem code is. progress returns data not identify data single file.

is there way find out if return progress single data?.

for came across same issue. there's no need hack code actually. use this in upload progress callback.

s3.upload(params, function (err, data) {     ... }).on('httpuploadprogress', function(progress) {     // here can use `this.body` determine file particular     // event related , use info calculate overall progress. }); 

i've posted issue in aws sdk js repo, , maybe there better solution on time.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -