Use blob URL for Tesseract to avoid CORS issues (#11964)
This commit is contained in:
parent
f31530b74d
commit
7baedcb61e
3 changed files with 17 additions and 6 deletions
|
@ -234,7 +234,7 @@ export function uploadCompose(files) {
|
|||
progress[i] = loaded;
|
||||
dispatch(uploadComposeProgress(progress.reduce((a, v) => a + v, 0), total));
|
||||
},
|
||||
}).then(({ data }) => dispatch(uploadComposeSuccess(data)));
|
||||
}).then(({ data }) => dispatch(uploadComposeSuccess(data, f)));
|
||||
}).catch(error => dispatch(uploadComposeFail(error)));
|
||||
};
|
||||
};
|
||||
|
@ -289,10 +289,11 @@ export function uploadComposeProgress(loaded, total) {
|
|||
};
|
||||
};
|
||||
|
||||
export function uploadComposeSuccess(media) {
|
||||
export function uploadComposeSuccess(media, file) {
|
||||
return {
|
||||
type: COMPOSE_UPLOAD_SUCCESS,
|
||||
media: media,
|
||||
file: file,
|
||||
skipLoading: true,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue