Skip to content

Releases: muxinc/upchunk

v3.0.0 - ReadableStreams!

28 Nov 17:26
d7d9d4b
Compare
Choose a tag to compare

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

19 Aug 19:58
Compare
Choose a tag to compare

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

18 Aug 20:29
d11fe73
Compare
Choose a tag to compare

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

27 Jun 21:29
Compare
Choose a tag to compare
  • 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

31 Mar 21:14
Compare
Choose a tag to compare

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

04 Mar 00:15
Compare
Choose a tag to compare
  • Up the default chunk size from ~5MB to ~30MB, as the latter provides better overall performance
  • [Documentation] Add section on the abort method
  • [Documentation] Update example for getting started in the readme

v2.2.2 - Fix 'progress' callback timetravel

23 Feb 05:08
Compare
Choose a tag to compare
  • 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

19 Feb 05:05
Compare
Choose a tag to compare

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

02 Dec 05:48
908c9e3
Compare
Choose a tag to compare

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
});

v2.1.1: abort and more HTTP methods

30 Nov 06:56
c6cadcf
Compare
Choose a tag to compare

A big part of this release is that we've added quite a few tests (and could always use more)! This will make it much easier for us to pull in changes quickly, so thanks for the contributions!

Changelog

Abort

@paulbellamy contributed a new abort method. pause remains unchanged and stops uploading after the in-flight chunk is done. The new abort method pauses, but also cancels any in-flight XHR request.

More HTTP requests

@ickyicky contributed being able to use PATCH or POST requests instead of just PUT when uploading each individual chunk.

chunkComplete event

The old behavior of the progress callback was that the event was fired after each chunk was successfully uploaded. This led to very "chunky" (ba dum tissss) progress updates, which is a big reason behind our switch to XHR in the 2.0 release. chunkComplete brings back that functionality, allowing you to potentially save which chunks are complete or more.