Skip to content

Support ArrayBuffer, TypedArray, DataView, Blob and Web Streams in every environment #766

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 11 commits into from
Apr 25, 2025

Conversation

Acconut
Copy link
Member

@Acconut Acconut commented Apr 25, 2025

Currently, Blobs and Web Streams are only accepted in browser environments, even though they are available in Node.js as well. In addition, tus-js-client does not accept ArrayBuffer, SharedArrayBuffer, TypedArray (like Uint8Array) or DataView.

This PR addresses these points by ensures that all of the above types are accepted in Node.js and browsers. After these changes, the differences between accepted types are only:

  • in Node.js, tus-js-client also allows Node.js Streams and fs.ReadStreams
  • in browser-like environment, tus-js-client accepts objects from React Native and Apache Cordova.

@Acconut Acconut self-assigned this Apr 25, 2025
@Acconut Acconut mentioned this pull request Apr 25, 2025
27 tasks
@Acconut Acconut merged commit c912232 into main Apr 25, 2025
8 of 10 checks passed
@Acconut Acconut deleted the arraybuffer branch April 25, 2025 18:44
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.

1 participant