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 on larger multipart uploads #204

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

Conversation

lehni
Copy link

@lehni lehni commented Mar 15, 2023

We are encountering this problem with larger file uploads ,e.g. video files of roughly 20MB size. The total is missing, but the last event received has the actual file-size in the loaded property. This simple fix addresses this situation.

Fixes #183

@tcastelli
Copy link

any chances of getting this merged?

@lcgiry
Copy link

lcgiry commented Nov 6, 2023

Hi,
Yes merging it would solve some issue we're facing, that would be nice !
Thanks

@immad-imtiaz
Copy link

immad-imtiaz commented Dec 12, 2023

@LinusU @anacronw Can this be merged and released?

@lehni
Copy link
Author

lehni commented Dec 14, 2023

Once it's merged, you can then also close #197 and #191.

@keshav-c
Copy link

+1 to see this merged 🙏

@Shandur
Copy link

Shandur commented Jul 24, 2024

up @LinusU @anacronw

@santiq
Copy link

santiq commented Aug 13, 2024

Can you guys take a look @LinusU @anacronw ? I'm willing to add unit test for this if needed

@toritsejuFO
Copy link

toritsejuFO commented Oct 26, 2024

I was just about to created a PR for this before seeing this PR as a suggestion to one of the issues.

Although I had a different thought towards it below

var currentSize = 0
var bytesLoaded = 0
...
...
...
upload.on('httpUploadProgress', function (ev) {
    if (ev.total) currentSize = ev.total
    if (ev.loaded) bytesLoaded = ev.loaded
})

cb(null, {
    size: currentSize,
    bytesUploaded: bytesLoaded,
    bucket: opts.bucket,
...

Nonetheless, +1 to see this merged 👍🏿, it's over a year now.

@lehni
Copy link
Author

lehni commented Oct 27, 2024

@toritsejuFO if that works then your code seems more correct?

@toritsejuFO
Copy link

They're the same thing. Later went with installing your commit directly. Thanks

@santiq
Copy link

santiq commented Oct 28, 2024

I ended up forking this lib, and applying almost all of the different fixes and improvements like

#204 #216 #206 #201 #199 #191

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.

File size is 0 for quicktime files
8 participants