Merge pull request #3712 from forbxy/master

fix:can't choose same file twice when in upload file
This commit is contained in:
Min RK 2018-08-01 13:11:44 +02:00 committed by GitHub
commit b94cc449db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,11 +338,11 @@ define([
reader.onerror = reader_onerror;
}
});
// Replace the file input form wth a clone of itself. This is required to
// Clear fileinput value. This is required to
// reset the form. Otherwise, if you upload a file, delete it and try to
// upload it again, the changed event won't fire.
var form = $('input.fileinput');
form.replaceWith(form.clone(true));
form.val('');
return false;
};