소스 검색

HUE-4730 [fb] Notify about failing file upload in file chooser

Romain Rigaux 9 년 전
부모
커밋
9e38ad8
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      desktop/core/src/desktop/static/desktop/js/jquery.filechooser.js

+ 4 - 1
desktop/core/src/desktop/static/desktop/js/jquery.filechooser.js

@@ -402,7 +402,10 @@
       },
       onComplete: function (id, fileName, responseJSON) {
         num_of_pending_uploads--;
-        if (num_of_pending_uploads == 0) {
+        if (responseJSON.status == -1) {
+          $(document).trigger("error", responseJSON.data);
+        }
+        else if (num_of_pending_uploads == 0) {
           _parent.navigateTo(path);
         }
       },