I am using jQuery File Upload jQuery UI Plugin 8.7.2 from https://github.com/blueimp/jQuery-File-Upload Uploading and deleting of files work successfully. But what should I return in response JSON to show error when deleting of file not finished correctly on server side. For example user have not access for this.
This is my PHP code:
$response = json_encode(
(object)
[ 'files' =>
[
$file->filename => true,
]
]
);
return $response;
Heres how I do it in Laravel. You should change the loop to deal with all files received in the POST
The UI plugin doesn't seem to do anything with the response so you'd need to modify the jquery.fileupload-ui.js code in order to do something with an error response.