瀏覽代碼

Provide an informative error message when account size limit is reached

mbliznikova 1 年之前
父節點
當前提交
4e567e3411
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      resources/assets/js/components/ComposeModal.vue

+ 8 - 1
resources/assets/js/components/ComposeModal.vue

@@ -1204,12 +1204,19 @@ export default {
 					}, 300);
 					}, 300);
 				}).catch(function(e) {
 				}).catch(function(e) {
 					switch(e.response.status) {
 					switch(e.response.status) {
+						case 403:
+							self.uploading = false;
+							io.value = null;
+							swal('Account size limit reached', 'Contact your admin for assistance.', 'error');
+							self.page = 2;
+						break;
+
 						case 413:
 						case 413:
 							self.uploading = false;
 							self.uploading = false;
 							io.value = null;
 							io.value = null;
 							swal('File is too large', 'The file you uploaded has the size of ' + self.formatBytes(io.size) + '. Unfortunately, only images up to ' + self.formatBytes(self.config.uploader.max_photo_size  * 1024) + ' are supported.\nPlease resize the file and try again.', 'error');
 							swal('File is too large', 'The file you uploaded has the size of ' + self.formatBytes(io.size) + '. Unfortunately, only images up to ' + self.formatBytes(self.config.uploader.max_photo_size  * 1024) + ' are supported.\nPlease resize the file and try again.', 'error');
 							self.page = 2;
 							self.page = 2;
-							break;
+						break;
 
 
 						case 451:
 						case 451:
 							self.uploading = false;
 							self.uploading = false;