if it aint empty, excute the function
This commit is contained in:
parent
f23c03c69d
commit
caf38275ff
@ -3349,10 +3349,10 @@ function scanNetworks() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// UPLOAD CUSTOM STOCK LOGO
|
||||
function uploadStockLogo() {
|
||||
const fileInput_stocks = document.getElementById("stocks-logo-upload-browse");
|
||||
if (fileInput_stocks.value !== "") {
|
||||
const stock_file = fileInput_stocks.files[0];
|
||||
const stock_upload_msg = document.getElementById("stocklogoupload");
|
||||
|
||||
@ -3367,12 +3367,13 @@ function uploadStockLogo() {
|
||||
stock_upload_msg.style.display = "none";
|
||||
}, 5000);
|
||||
fileInput_stocks.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// UPLOAD CUSTOM CRYPTO LOGO
|
||||
function uploadCryptoLogo() {
|
||||
const fileInput_crypto = document.getElementById("crypto-logo-upload-browse");
|
||||
if (fileInput_crypto.value !== "") {
|
||||
const crypto_file = fileInput_crypto.files[0];
|
||||
const crypto_upload_msg = document.getElementById("cryptologoupload");
|
||||
|
||||
@ -3381,11 +3382,12 @@ function uploadCryptoLogo() {
|
||||
fetch('/upload_crypto', {
|
||||
method: 'POST',
|
||||
body: formData_crypto
|
||||
})
|
||||
});
|
||||
crypto_upload_msg.style.display = "block";
|
||||
setTimeout(function hideElement() {
|
||||
crypto_upload_msg.style.display = "none";
|
||||
}, 5000);
|
||||
fileInput_crypto.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user