Better error handling for image upload

This commit is contained in:
Jose Olarte III
2025-05-28 16:17:49 +08:00
parent a9a0f1e891
commit 69abb67ea0

View File

@@ -629,6 +629,7 @@ export default class ImageMethodDialog extends Vue {
5000, 5000,
); );
this.uploading = false; this.uploading = false;
this.close();
return; return;
} }
formData.append("image", this.blob, this.fileName || "photo.jpg"); formData.append("image", this.blob, this.fileName || "photo.jpg");
@@ -683,6 +684,7 @@ export default class ImageMethodDialog extends Vue {
); );
this.uploading = false; this.uploading = false;
this.blob = undefined; this.blob = undefined;
this.close();
} }
} }