From: Calin Crisan <ccrisan@gmail.com> Date: Sat, 14 Mar 2015 14:50:42 +0000 (+0200) Subject: zip creation errors are now reported to the user X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=b3407cc9dfd020e7172ce56dea39f42f7ad393de;p=motioneye-debian zip creation errors are now reported to the user --- diff --git a/static/js/main.js b/static/js/main.js index 7f99441..18d2e75 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -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); + } }); }