Fixes issue removing existing uploads
This commit is contained in:
parent
b6ba31bd86
commit
6ebe187db1
|
|
@ -195,8 +195,17 @@
|
|||
|
||||
FileUpload.prototype.removeFileFromElement = function($element) {
|
||||
var self = this
|
||||
|
||||
$element.each(function() {
|
||||
self.dropzone.removeFile($(this).data('dzFileObject'))
|
||||
var $el = $(this),
|
||||
obj = $el.data('dzFileObject')
|
||||
|
||||
if (obj) {
|
||||
self.dropzone.removeFile(obj)
|
||||
}
|
||||
else {
|
||||
$el.remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue