Update upload location

This commit is contained in:
Michał 2023-04-21 17:44:55 +00:00
parent dd0e009200
commit e69ac64855

View file

@ -276,12 +276,14 @@ document.addEventListener('DOMContentLoaded', () => {
// });
fetch('/api/upload', {
fetch('/api/media/upload', {
method: 'POST',
body: formData
})
// .then(response => response.json())
.then(data => { addNotification("Image uploaded successfully", 1); })
.then(data => {
addNotification("Image uploaded successfully", 1);
})
.catch(error => {
switch (response.status) {
case 500:
@ -303,7 +305,6 @@ document.addEventListener('DOMContentLoaded', () => {
}
});
clearUpload();
// Reset drop