From e69ac648554a7733a209450434e1750f19466867 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Fri, 21 Apr 2023 17:44:55 +0000 Subject: [PATCH] Update upload location --- onlylegs/static/js/uploadTab.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/onlylegs/static/js/uploadTab.js b/onlylegs/static/js/uploadTab.js index 1769fec..a27e57f 100644 --- a/onlylegs/static/js/uploadTab.js +++ b/onlylegs/static/js/uploadTab.js @@ -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