mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2024-12-29 10:56:10 +00:00
Update upload location
This commit is contained in:
parent
dd0e009200
commit
e69ac64855
|
@ -276,12 +276,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
fetch('/api/upload', {
|
fetch('/api/media/upload', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData
|
body: formData
|
||||||
})
|
})
|
||||||
// .then(response => response.json())
|
// .then(response => response.json())
|
||||||
.then(data => { addNotification("Image uploaded successfully", 1); })
|
.then(data => {
|
||||||
|
addNotification("Image uploaded successfully", 1);
|
||||||
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
switch (response.status) {
|
switch (response.status) {
|
||||||
case 500:
|
case 500:
|
||||||
|
@ -303,7 +305,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
clearUpload();
|
clearUpload();
|
||||||
|
|
||||||
// Reset drop
|
// Reset drop
|
||||||
|
|
Loading…
Reference in a new issue