Skip to content
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

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

Merged
merged 4 commits into from
May 6, 2024
Merged

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

merged 4 commits into from
May 6, 2024

Conversation

netdown
Copy link
Contributor

@netdown netdown commented May 5, 2024

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

Copy link

changeset-bot bot commented May 5, 2024

🦋 Changeset detected

Latest commit: 52a08f8

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

@Murderlon Murderlon changed the title Fix GCS resumable upload @tus/gcs-store: fix multichunk uploads May 6, 2024
Copy link
Member

@Murderlon Murderlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally a test would have caught this but I need to restructure the e2e tests so more tests can be reused.

@Murderlon Murderlon merged commit 86b8b9f into tus:main May 6, 2024
4 checks passed
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.

CRC errors using @google-cloud/storage 7.7.0
2 participants