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/server: allow onUploadFinish hook to override response data #615

Merged
merged 8 commits into from
May 13, 2024

Conversation

netdown
Copy link
Contributor

@netdown netdown commented May 7, 2024

Follow-up on #606. Changes based on #599.

Copy link

changeset-bot bot commented May 7, 2024

🦋 Changeset detected

Latest commit: 38c3114

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

This PR includes changesets to release 1 package
Name Type
@tus/server Minor

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

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.

Thanks for working on this!

packages/server/README.md Outdated Show resolved Hide resolved
packages/server/src/handlers/PostHandler.ts Outdated Show resolved Hide resolved
packages/server/src/types.ts Outdated Show resolved Hide resolved
netdown and others added 3 commits May 9, 2024 14:37
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
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.

Thanks for making a test as wel

packages/server/src/handlers/PostHandler.ts Outdated Show resolved Hide resolved
netdown and others added 2 commits May 13, 2024 09:39
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
@Murderlon Murderlon merged commit 0f90980 into tus:main May 13, 2024
4 checks passed
Murderlon added a commit to netdown/tus-node-server that referenced this pull request Jul 15, 2024
* main:
  Add issue templates
  [ci] release (tus#625)
  Add .npmrc
  @tus/server: add `lastPath` arg to `getFileIdFromRequest` (tus#626)
  Add basic storage info to Upload model (tus#624)
  Release
  v0.0.0
  @tus/server: allow onUploadFinish hook to override response data (tus#615)
@andreineamtu
Copy link

Thank you for the test too! From there I understood that it's important to include the "res" object too so it works!
Also that line "If the function returns the (modified) response, the upload will finish." in the README file is very important, but in the latest version is not present anymore. Could you put it back?

@Murderlon
Copy link
Member

So it wasn't clear that you have to return res in the object? In the next major it will be removed but for now it's needed.

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.

3 participants