diff --git a/assets/js/userarea.js b/assets/js/userarea.js index 576f179..2cd48d6 100644 --- a/assets/js/userarea.js +++ b/assets/js/userarea.js @@ -117,10 +117,12 @@ function uploadFile(file, progressBar, thumbnail) { xhr.open('POST', document.location.href, true); xhr.onload = () => { - if (xhr.status === 200) { + if (xhr.status === 201) { const response = JSON.parse(xhr.responseText); const thumbnailUrl = response.thumbnailUrl; thumbnail.src = thumbnailUrl; + progressBar.classList.add('bg-success'); + progressBar.textContent = "Success!"; } else { progressBar.classList.add('bg-danger'); progressBar.textContent = "Error!";