Chunkinator
Upload large files from the browser with ease
yarn add @atlaskit/chunkinator
7.0.0
Major Changes
-
#117363
10a0f7f6c2027
- This package'speerDependencies
have been adjusted forreact
and/orreact-dom
to reflect the status of only supporting React 18 going forward. No explicit breaking change to React support has been made in this release, but this is to signify going forward, breaking changes for React 16 or React 17 may come via non-major semver releases.Please refer this community post for more details: https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
Internal Media Use Only
Chunkinator is intended for internal use by the Media Platform and as a transitive dependency of a media package within your product.
Direct use of this component is not supported.
Consider using Media Picker instead.
Note: This component is designed for internal Atlassian development.
External contributors will be able to use this component but will not be able to submit issues.
RxJS compatibility
Chunkinator currently requires rxjs@^5.5.0 as peer dependency.
Upload large files from the browser with ease
Usage
import {chunkinator} from '@atlaskit/chunkinator';
import {Subject} from "rxjs";
import {takeUntil} from "rxjs/operators";
const cancelSubject = new Subject<void>();
const chunkinatorObservable = chunkinator(
blob,
{
hashingConcurrency: 5,
chunkSize: 10000,
uploadingConcurrency: 3,
uploadingFunction,
processingBatchSize,
processingFunction: createProcessingFunction(deferredUploadId),
},
{
onProgress(progress) {
console.log({progress})
},
},
);
await chunkinatorObservable.pipe(takeUntil(cancelSubject)).toPromise();