Open imam opened 7 years ago
Both cases, same output(null
)
+1 with the same issue.
As a temporary workaround you could use additional hidden input like this, gets the job done:
<input type="file" name="picture" class="dropify" data-default-file="file.jpg">
<input type="hidden" name="picture_removed" id="picture_removed" value="0">
And use js callback:
var drEvent = $('.dropify').dropify();
drEvent.on('dropify.afterClear', function(event, element){
$("#picture_removed").val("1");
});
And finally check in your php:
if($_POST['picture_removed'] == 1) {
unlink('file.jpg');
}
did you get the answer
The use case is:
Is this use case built in already?