]> www.vanbest.org Git - motioneye-debian/commitdiff
zip creation errors are now reported to the user
authorCalin Crisan <ccrisan@gmail.com>
Sat, 14 Mar 2015 14:50:42 +0000 (16:50 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 14 Mar 2015 14:50:42 +0000 (16:50 +0200)
static/js/main.js

index 7f99441e1675a134cd0ed5689ec3708958665708..18d2e75041e7581087fc086b1985ec4058fab978 100644 (file)
@@ -1869,8 +1869,14 @@ function doUpdate() {
 function doDownloadZipped(cameraId, groupKey) {
     showModalDialog('<div class="modal-progress"></div>', null, null, true);
     ajax('GET', baseUri + 'picture/' + cameraId + '/zipped/' + groupKey + '/', null, function (data) {
-        hideModalDialog(); /* progress */
-        downloadFile(baseUri + 'picture/' + cameraId + '/zipped/' + groupKey + '/?key=' + data.key);
+        if (data.error) {
+            hideModalDialog(); /* progress */
+            showErrorMessage(data.error);
+        }
+        else {
+            hideModalDialog(); /* progress */
+            downloadFile(baseUri + 'picture/' + cameraId + '/zipped/' + groupKey + '/?key=' + data.key);
+        }
     });
 }