summaryrefslogtreecommitdiff
path: root/app/client/api/crud.upload.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-29 18:51:27 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-29 18:51:27 +0200
commitfe8cef1b709f09f508f17d0d6d06f204dd44a8bb (patch)
tree75c03c0734106dda0a4e5b407778b58ec758d029 /app/client/api/crud.upload.js
parent7d71a0248a8746088142bb51ce4248c76f274f30 (diff)
pushing files to s3.. filelist color
Diffstat (limited to 'app/client/api/crud.upload.js')
-rw-r--r--app/client/api/crud.upload.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/client/api/crud.upload.js b/app/client/api/crud.upload.js
index 97b6769..2e0269a 100644
--- a/app/client/api/crud.upload.js
+++ b/app/client/api/crud.upload.js
@@ -20,11 +20,13 @@ export function crud_upload(type, fd, data, dispatch) {
dispatch && dispatch({ type: as_type(type, 'upload_loading')})
+ let complete = false
+
function uploadProgress (e) {
if (e.lengthComputable) {
dispatch && dispatch({
type: as_type(type, 'upload_progress'),
- percent: Math.round(e.loaded * 100 / e.total),
+ percent: Math.round(e.loaded * 100 / e.total) || 0,
[type]: id,
})
}