onUploadCreate vs create event and how to fail a `POST_CREATE` event


I’m a newbie to tus, and javascript, so apologies if this sounds stupid. What’s the difference between the onUploadCreate function attached to the server and the POST_CREATE event in the git tus-node-server docs?

Also, how can I fail the POST_CREATE function? It doesn’t seem to like it if I throw an error


Events, such as POST_CREATE, are non-blocking ‘fire and forget’ functions. Hooks are blocking and can alter the response or throw an error.

The example you linked should work, as in a throw will fail the upload.

Thats great thanks, i wasn’t aware they were a fire and forget callback.