upload global stocks function added

This commit is contained in:
Justin 2023-09-25 22:23:48 +08:00 committed by GitHub
parent b08fd37013
commit 2005623025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3788,6 +3788,27 @@ function uploadStockLogo() {
}
}
// UPLOAD CUSTOM GLOBAL STOCK LOGO
function uploadGlobalStockLogo() {
const fileInput_globalstocks = document.getElementById("globalstocks-logo-upload-browse");
if (fileInput_globalstocks.value !== "") {
const globalstock_file = fileInput_globalstocks.files[0];
const globalstock_upload_msg = document.getElementById("globalstocklogoupload");
const formData_globalstocks = new FormData();
formData_globalstocks.append('file', globalstock_file)
fetch('/upload_globalstocks', {
method: 'POST',
body: formData_globalstocks
})
globalstock_upload_msg.style.display = "block";
setTimeout(function hideElement() {
globalstock_upload_msg.style.display = "none";
}, 5000);
fileInput_globalstocks.value = "";
}
}
// UPLOAD CUSTOM CRYPTO LOGO
function uploadCryptoLogo() {
const fileInput_crypto = document.getElementById("crypto-logo-upload-browse");