show error messages instead of Unknown Error, add an Images table so now the same images cant be uploaded multiple times

This commit is contained in:
csd4ni3l
2025-08-09 12:42:02 +02:00
parent 471cd21993
commit c0eb5b59dd
2 changed files with 23 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ function upload_file(file_type, file_content) {
}
}
).then(response => {
if (response.status == 401) {
if (response.status == 401 || response.status == 400) {
response.text().then(text => {
if (text) {
upload_error(text);
@@ -69,10 +69,6 @@ function upload_file(file_type, file_content) {
)
return;
}
else if (response.status == 400) {
upload_error("Unknown error");
return;
}
return response.text();
})