tus / tus-node-server

Node.js tus server, standalone or integrable in any framework, with disk, S3, and GGC stores.
https://tus.io/
MIT License
795 stars 197 forks source link

@tus/gcs-store: fix multichunk uploads #612

Closed netdown closed 4 months ago

netdown commented 4 months ago

Fixes #548.

Multichunk uploads are broken starting from @google-cloud/storage v7.6. The reason is that this PR introduces a CRC32 check if File.createWriteStream is called with an offset param set.

Since tus-node-server does not rely on the internal resumable upload feature of GCS (which was actually broken below 7.6), there is no need to create the stream with the offset param at all. See docs: https://googleapis.dev/nodejs/storage/latest/global.html#CreateWriteStreamOptions

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 52a08f87a33f66a6fe3dca146c55fe0fa9d25309

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | @tus/gcs-store | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR