I am using blueimg jquery file upload Basic Plus UI version and it uploads image to server fine.
http://blueimp.github.io/jQuery-File-Upload/
Howver, then I click delete button to delete uploaded image(s), the image get deleted on screen, BUT not deleted from server directory where the images are.
When I refresh the screen all the uploaded images (regardless deleted or not) re-appear on the screen.
Could anyone tell me: 1. How to actually delete the images from server? (not just from web screen) 2. When I refresh the screen, do not show any loaded images, just clear the screen (re start upload process)
Thanks in advance!
Assuming you're using the UploadHandler.php class...
By default the method for deleting files is DELETE, but not all servers support this. You can change it to POST by setting the $options parameter of the class constructor.
$foo = new UploadHandler(array('delete_type' => 'POST'));
See line 52 of UploadHandler.php
//Set the following option to 'POST', if your server does not support
//DELETE requests. This is a parameter sent to the client:
'delete_type' => 'DELETE',