From a77de3f5ee9826e8391735ee18809fc716c35bbd Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 29 May 2018 02:01:04 +0200 Subject: dispatch all the events lol --- app/client/api/crud.upload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 42aae2b..26917ff 100644 --- a/app/client/api/crud.upload.js +++ b/app/client/api/crud.upload.js @@ -1,6 +1,6 @@ import { as_type } from './crud.types' -export function upload(type, id, fd, dispatch) => { +export function crud_upload(type, id, fd, dispatch) => { return new Promise( (resolve, reject) => { const xhr = new XMLHttpRequest() xhr.upload.addEventListener("progress", uploadProgress, false) @@ -66,5 +66,5 @@ export function upload(type, id, fd, dispatch) => { } export function uploadAction(type, id, fd) { - return dispatch => upload(type, id, fd, dispatch) + return dispatch => crud_upload(type, id, fd, dispatch) } \ No newline at end of file -- cgit v1.2.3-70-g09d2