summaryrefslogtreecommitdiff
path: root/app/client/api/crud.upload.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/api/crud.upload.js')
-rw-r--r--app/client/api/crud.upload.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/client/api/crud.upload.js b/app/client/api/crud.upload.js
index 65ae4e0..01c3e18 100644
--- a/app/client/api/crud.upload.js
+++ b/app/client/api/crud.upload.js
@@ -57,6 +57,7 @@ export function crud_upload(type, fd, data, dispatch) {
error: 'upload failed',
[type]: id,
})
+ reject(e)
return
}
dispatch && dispatch({
@@ -64,6 +65,7 @@ export function crud_upload(type, fd, data, dispatch) {
data,
[type]: id,
})
+ resolve(data)
}
function uploadFailed (evt) {
@@ -72,6 +74,7 @@ export function crud_upload(type, fd, data, dispatch) {
error: 'upload failed',
[type]: id,
})
+ reject(evt)
}
function uploadCancelled (evt) {
@@ -80,6 +83,7 @@ export function crud_upload(type, fd, data, dispatch) {
error: 'upload cancelled',
[type]: id,
})
+ reject(evt)
}
})
}