Custom Delete Endpoint
Configure the URL used when removing a completed file. Supports {fileGuid} placeholder.
(function() {
new MultipleUpload('#demo', {
uploadUrl: '/api/upload',
multiple: true,
removable: true,
deleteUrl: '/api/files/{fileGuid}/delete'
});
})();Placeholders: Use
{fileGuid} in the URL. If omitted, the uploader appends the GUID to the upload URL.
Removing a file that already reached the server
deleteUrl defaults to null, so removing a completed file takes it out of the queue and leaves the server copy alone. Set it and removal also calls your endpoint, which is what you want when uploads are stored immediately rather than on form submit.
Authorise it like any other destructive route
This endpoint deletes things, and it is called from the browser with an identifier the client is holding. Check that the caller owns the file before acting, and prefer a soft delete you can reverse — a mis-click here is not recoverable for the user.