diff options
-rw-r--r-- | frontend/js/app.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/js/app.js b/frontend/js/app.js index 7a80ba7..e446db3 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js | |||
@@ -171,7 +171,8 @@ function uploadFiles(files) { | |||
171 | if (!(event.target instanceof XMLHttpRequestUpload)) return; | 171 | if (!(event.target instanceof XMLHttpRequestUpload)) return; |
172 | 172 | ||
173 | app.uploadStatus.done = finishedUploadSize + event.loaded; | 173 | app.uploadStatus.done = finishedUploadSize + event.loaded; |
174 | app.uploadStatus.percentDone = Math.round(app.uploadStatus.done / app.uploadStatus.size * 100); | 174 | var tmp = Math.round(app.uploadStatus.done / app.uploadStatus.size * 100); |
175 | app.uploadStatus.percentDone = tmp > 100 ? 100 : tmp; | ||
175 | }).end(function (error, result) { | 176 | }).end(function (error, result) { |
176 | if (result && result.statusCode === 401) return logout(); | 177 | if (result && result.statusCode === 401) return logout(); |
177 | if (result && result.statusCode !== 201) return callback('Error uploading file: ', result.statusCode); | 178 | if (result && result.statusCode !== 201) return callback('Error uploading file: ', result.statusCode); |