-
Notifications
You must be signed in to change notification settings - Fork 71
feat(blob): Provide onUploadProgress({ loaded, total, percentage }) #782
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
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
d70a84e
feat(blob): Provide onUploadProgress({ loaded, total, percentage })
vvo 0e11640
update
vvo 33085b4
lint
vvo 10efcfa
add 0 percent loading before request starts
vvo 9a4a7fd
fix https://github.com/vercel/storage/pull/782#discussion_r1814651919
vvo 59e01f6
Fix https://github.com/vercel/storage/pull/782\#discussion_r1814659658
vvo 6e6d7b9
fix https://github.com/vercel/storage/pull/782\#discussion_r1814676109
vvo 57d0270
Fix https://github.com/vercel/storage/pull/782\#discussion_r1814676691
vvo 4fbdc0e
Update packages/blob/src/helpers.ts
vvo c69d7e7
fix types
vvo 808ed45
Merge branch 'feat/blob/on-progress' of github.com:vercel/storage int…
vvo 7aa175b
move fetch to its own file
vvo c8d7567
xhr fallback + refactor
vvo 00727af
Update packages/blob/src/helpers.ts
vvo 45151d9
style
vvo 3ee617d
fix
vvo 237165c
cosmetic changesgp
vvo 703090e
add debugging msg
vvo 84cd3f0
remove
vvo 248b360
fix tests
vvo ba3a851
update multipart
vvo 912f988
fix lint
vvo e64dd26
make progress events during fetch async
vvo 2c8e0ba
add tests, expose event and callback
vvo a0c7521
changeset
vvo 5f0ad1c
lint
vvo 3c596cb
update
vvo 9d6ddac
update
vvo 4629f9a
update
vvo a74ff98
update
vvo 37e0ae5
make streams and progress compatible
vvo 639a0ac
retry on network errors
vvo 26462db
comments around api code
vvo 628929f
CMON js
vvo 42146d8
C'MON JS
vvo aa99c22
update
vvo a6fd11f
Merge branch 'main' into feat/blob/on-progress
vvo 5bff1ec
downgrade undici to allow for old Next.js and Node.js versions
vvo a28959f
update
vvo aabdf54
update
vvo 91d0478
node 16
vvo d24da2e
node 16 updates
vvo 682d4ba
update
vvo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
'@vercel/blob': minor | ||
'vercel-storage-integration-test-suite': minor | ||
--- | ||
|
||
Add onUploadProgress feature to put/upload | ||
|
||
You can now track the upload progress in Node.js and all major browsers when | ||
using put/upload in multipart, non-multipart and client upload modes. Basically | ||
anywhere in our API you can upload a file, then you can follow the upload | ||
progress. | ||
|
||
Here's a basic usage example: | ||
|
||
``` | ||
const blob = await put('big-file.pdf', file, { | ||
access: 'public', | ||
onUploadProgress(event) { | ||
console.log(event.loaded, event.total, event.percentage); | ||
} | ||
}); | ||
``` | ||
|
||
Fixes #543 | ||
Fixes #642 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.