1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00
This commit is contained in:
muerwre 2019-08-09 19:16:50 +07:00
parent 92f097d161
commit d46906175b
2 changed files with 2 additions and 0 deletions

View file

@ -45,4 +45,5 @@ const ImageEditor = connect(
mapStateToProps, mapStateToProps,
mapDispatchToProps mapDispatchToProps
)(ImageEditorUnconnected); )(ImageEditorUnconnected);
export { ImageEditor }; export { ImageEditor };

View file

@ -36,6 +36,7 @@ function* uploadWorker(file: File, temp_id: UUID) {
return yield call(promise, { temp_id, file }); return yield call(promise, { temp_id, file });
} }
function* uploadFile({ file, temp_id }: IFileWithUUID) { function* uploadFile({ file, temp_id }: IFileWithUUID) {
if (!file.type || !VALIDATORS.IS_IMAGE_MIME(file.type)) { if (!file.type || !VALIDATORS.IS_IMAGE_MIME(file.type)) {
return { error: 'File_Not_Image', status: HTTP_RESPONSES.BAD_REQUEST, data: {} }; return { error: 'File_Not_Image', status: HTTP_RESPONSES.BAD_REQUEST, data: {} };