Releases: muxinc/upchunk
TypeScript Compatibility Fixes
Fix: Refactored to use some older TypeScript syntax to ensure greater backwards compatibility.
v3.0.0 - ReadableStreams!
This release refactors UpChunk to use ReadableStream
under the hood which allows for, among other things, better memory management, particularly for large files. It also positions the architecture for other dynamic upload use cases, such as MediaRecorder
.
v2.6.0: Externalize retry codes
This release adds the ability to specify which HTTP response codes should trigger a retry for a failed chunk. It also fixes up the names of some of the config options in README.md
to match the code.
v2.5.0: Now with optional dynamic chunk sizes
This release adds (optional) dynamic chunk sizes. Simply set the dynamicChunkSize
(boolean) option to true
, and the chunk size will change dynamically depending on upload speed, to try to optimize the upload. We also added maxChunkSize
(number) and minChunkSize
(number) options, that work in conjunction with dynamicChunkSize
to allow you to set minimum and maximum values for the chunk size.
Update release packages
- Published packages now include cjs and esm bundles, and package.json updated to use modern declaration of different bundle targets by usage 🎉
- Updated github actions to test against modern/currently suppported npm releases (14.x, 16.x, & 18.x)
v2.3.1 - Update event-target-shim
This release updates the event-target-shim
dependency in order to fix a potential infinite recursion bug caused by the older version.
Thanks to @bgila for the original PR, and @cjpillsbury for making the types happy. 🙌
v2.3.0
v2.2.2 - Fix 'progress' callback timetravel
- This bug was tracked in #30. On certain file sizes the
progress
event would travel back in time. The bug did not affect usability, but it was rather jarring and unexpected for users. Imagine seeing a progress bar inching up as your file is uploaded and then bam all of a sudden when it gets to ~50% it jumps back in time to 33%, and then after that it jumps up to 51%. That's no good. - Thankfully @michaellimair squashed this 🐛 in #43 (and with great test coverage to boot! 🥾 ). Thanks Michael!
v2.2.1
Changelog
Once the upload is complete, make sure to stop trying to upload again.
@luizmacfilho fixed a bug where upchunk could attempt to continue uploading chunks after the upload is complete, ensuring that once the file is uploaded fully, upchunk stops.
v2.2.0: Limit upload sizes with maxFileSize
A common ask we've gotten is "how do I limit the upload size?" Well...the better pedantic answer is you should make sure to limit your uploads on the server, but it's only nice to also do so in the client. You don't want someone to spend all that time successfully uploading a huge file that breaks the rules.
Changelog
maxFileSize
option
@pchang211 added a new option, maxFileSize
, which allows you to specify (in kilobytes) the max file size to allow someone to initialize an upload with. If the file ends up being too large, the UpChunk instance will throw an error.
const upload = UpChunk.createUpload({
endpoint: "https://example.com/upload/server/address,
file: picker.files[0],
maxFileSize: 20480, // Max file size of 20mb
});