mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-22 06:28:46 -04:00
Clear file input on pste event, too
Fixes https://github.com/PrivateBin/PrivateBin/issues/318
This commit is contained in:
parent
567fa8b61f
commit
1985dff67c
3 changed files with 6 additions and 3 deletions
|
@ -2229,7 +2229,6 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
|
|||
loadedFile = $fileInput[0].files[0];
|
||||
$dragAndDropFileName.text('');
|
||||
} else {
|
||||
// TODO: cannot set original $fileWrap here for security reasons…
|
||||
$dragAndDropFileName.text(loadedFile.name);
|
||||
}
|
||||
|
||||
|
@ -2375,6 +2374,10 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
|
|||
if (items.hasOwnProperty(i)) {
|
||||
var item = items[i];
|
||||
if (item.kind === 'file') {
|
||||
//Clear the file input:
|
||||
$fileInput.wrap('<form>').closest('form').get(0).reset();
|
||||
$fileInput.unwrap();
|
||||
|
||||
readFileData(item.getAsFile());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue