While downloading object from S3 httpDownloadProgress event is not fired #4085
Replies: 2 comments
-
Hi @anonymous33999, tried this in a react project wasn't able to reproduce, a few things work differently in Android environment, if you can set up a repo for android or basically how you are doing it in android, I can try to work with whats going on. Code I used in my react project: var req = s3.getObject(params);
req.on('httpDownloadProgress', function (progress) {
console.log("Downloaded", progress.loaded, "of", progress.total, "bytes");
});
req.send(); |
Beta Was this translation helpful? Give feedback.
-
Hello @ajredniwja. Thanks for responding. I am using react-native to create an application that runs both on iOS and android platforms. My code is similar to your code and that code works fine on the iOS platform but the |
Beta Was this translation helpful? Give feedback.
-
I am working on a react native project. I need to download files from S3 and show the user the progress of the download. I am using the aws-sdk library. I am using the getObject method to download files. In the iOS platform, I am getting the progress via the httpDownloadProgress event but in android, the event is not firing. Thanks a lot!
This is my code
const downloadObject = s3.getObject(params, (err, data) => { //business logic }) downloadObject.on('httpDownloadProgress', progress =>{ setProgress(((+progress.loaded / +progress.total) * 100).toFixed(0)) } );
Beta Was this translation helpful? Give feedback.
All reactions