This is usually an option left to the client, as clients typically resume the transfer with the partially uploaded file.
However, you can also configure the server to use an event to delete the partially uploaded file. Here’s an example of moving a file once it is uploaded. You could modify this to trigger only on failure and delete the file instead of moving it.