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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ if ($MARKDOWN):
|
|||
<?php
|
||||
endif;
|
||||
?>
|
||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-CfLdTT20PvajSSX1FQB1Jqd26HKDLTlIfuS/iqBktG42V2H4bmlhU+qVGH/JOGxzFHe16IbaOxcipuJPDshoEQ==" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-bagkP/DFFnY16P1MohHVSPuymjJbJl/5kXuiWTrBeXudsxKi8YwuY90owWuH+YIUNUkTS4Dua9Zf4iw8L/kxEg==" crossorigin="anonymous"></script>
|
||||
<!--[if lt IE 10]>
|
||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||
<![endif]-->
|
||||
|
|
|
@ -54,7 +54,7 @@ if ($QRCODE):
|
|||
<?php
|
||||
endif;
|
||||
?>
|
||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-CfLdTT20PvajSSX1FQB1Jqd26HKDLTlIfuS/iqBktG42V2H4bmlhU+qVGH/JOGxzFHe16IbaOxcipuJPDshoEQ==" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-bagkP/DFFnY16P1MohHVSPuymjJbJl/5kXuiWTrBeXudsxKi8YwuY90owWuH+YIUNUkTS4Dua9Zf4iw8L/kxEg==" crossorigin="anonymous"></script>
|
||||
<!--[if lt IE 10]>
|
||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||
<![endif]-->
|
||||
|
|
Loading…
Reference in a new issue