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

Add pre-terminate hook #1248

Merged
merged 4 commits into from
Mar 3, 2025
Merged

Add pre-terminate hook #1248

merged 4 commits into from
Mar 3, 2025

Conversation

Acconut
Copy link
Member

@Acconut Acconut commented Feb 28, 2025

Closes #1202.

This PR adds the pre-terminate hook, which is invoked on DELETE requests before the upload is terminated and deleted. Application can use it to determine if an upload should actually be deleted, for example, rejecting the termination if other services use the uploaded file at the moment.

The new hook is not enabled by default to keep backwards compatibility.

TODO:

  • Automated tests
  • Manual tests

@Acconut Acconut merged commit e33611c into main Mar 3, 2025
14 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.

Is there a way to avoid races involving tusd deleting files from storage?
1 participant