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

Fix file size calculation #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

benglewis
Copy link

AWS doesn't promise to always return the total loaded size, sometimes it just returns the data size that was request to be loaded.

AWS doesn't promise to always return the total loaded size, sometimes it just returns the data size that was request to be loaded.
@LinusU
Copy link
Collaborator

LinusU commented Oct 25, 2022

AWS doesn't promise to always return the total loaded size

Could you link to some documentation on this?

@@ -216,7 +216,7 @@ S3Storage.prototype._handleFile = function (req, file, cb) {
})

upload.on('httpUploadProgress', function (ev) {
if (ev.total) currentSize = ev.total
if (ev.total) currentSize = ev.total || ev.loaded
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inside if (ev.total) so I don't think that this will change anything?

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

Successfully merging this pull request may close these issues.

2 participants