From fe8cef1b709f09f508f17d0d6d06f204dd44a8bb Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 29 May 2018 18:51:27 +0200 Subject: pushing files to s3.. filelist color --- app/client/api/crud.upload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/client/api/crud.upload.js') 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, }) } -- cgit v1.2.3-70-g09d2