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);
|
$dragAndDropFileName.text(loadedFile.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
file = loadedFile;
|
|
||||||
|
|
||||||
if (typeof loadedFile !== 'undefined') {
|
if (typeof loadedFile !== 'undefined') {
|
||||||
|
file = loadedFile;
|
||||||
fileReader.onload = function (event) {
|
fileReader.onload = function (event) {
|
||||||
const dataURL = event.target.result;
|
const dataURL = event.target.result;
|
||||||
attachmentData = dataURL;
|
attachmentData = dataURL;
|
||||||
|
@ -2765,6 +2764,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
TopNav.highlightFileupload();
|
TopNav.highlightFileupload();
|
||||||
};
|
};
|
||||||
fileReader.readAsDataURL(loadedFile);
|
fileReader.readAsDataURL(loadedFile);
|
||||||
|
} else {
|
||||||
|
me.removeAttachmentData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue