You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now uploads can be rejected in PreUploadCreateCallback or stopped in PostReceive (writeChunk).
I'd like to be able to Stop the upload before any data is written since if a condition that should stop the upload (like user has exceeded a quota) has occured the upload should not progress at all IMHO.
Such a hook would also be a good place to validate access token fields (just checking the user shuold be allowed to write to an upload path - token validity should be validated by middleware IMHO)
Describe the solution you'd like
There should be a pre-receive/pre-resume-upload hook that is called blockingly, before any data is passed to the store.
Describe alternatives you've considered
Relying on the PostReceive hook
Using a custom middleware: Don't like that because it adds compexity and needs to be checked/tested with every tusd revision
Can you provide help with implementing this feature?
Would be willing to give implementing it a try
Additional context
none
The text was updated successfully, but these errors were encountered:
In previous issues we have discussed adding a new hook for authenticating and authorizing read and write access to uploads: #669. For example, before the PATCH request will modify the resource, a hook is dispatched to ensure that the write access is allows. This is were you could place the check for you quota limit.
That would be a more reusable and general purpose than adding a specific hook for just PATCH requests.
Is your feature request related to a problem? Please describe.
Right now uploads can be rejected in PreUploadCreateCallback or stopped in PostReceive (
writeChunk
).I'd like to be able to Stop the upload before any data is written since if a condition that should stop the upload (like user has exceeded a quota) has occured the upload should not progress at all IMHO.
Such a hook would also be a good place to validate access token fields (just checking the user shuold be allowed to write to an upload path - token validity should be validated by middleware IMHO)
Describe the solution you'd like
There should be a pre-receive/pre-resume-upload hook that is called blockingly, before any data is passed to the store.
Describe alternatives you've considered
Can you provide help with implementing this feature?
Would be willing to give implementing it a try
Additional context
none
The text was updated successfully, but these errors were encountered: