mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
Clear attachment if user cancel file select
This commit is contained in:
parent
3a9730f883
commit
078b8d8fd6
|
@ -2750,9 +2750,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
$dragAndDropFileName.text(loadedFile.name);
|
||||
}
|
||||
|
||||
file = loadedFile;
|
||||
|
||||
if (typeof loadedFile !== 'undefined') {
|
||||
file = loadedFile;
|
||||
fileReader.onload = function (event) {
|
||||
const dataURL = event.target.result;
|
||||
attachmentData = dataURL;
|
||||
|
@ -2765,6 +2764,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
TopNav.highlightFileupload();
|
||||
};
|
||||
fileReader.readAsDataURL(loadedFile);
|
||||
} else {
|
||||
me.removeAttachmentData();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user