mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-28 07:26:34 -04:00
fix: added normalization to images added with the image tool to prevent MIME-mismatches (#10018)
* fix: fixed a bug where a MIME-mismatch in an image would cause an error to update cache * fix: fixed a bug where a MIME-mismatch in an image would cause an error to update cache * normalize inside insertImages() --------- Co-authored-by: Mårten Mossberg <marmo607@student.liu.se> Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
f738b74791
commit
91c7748c3d
@ -10461,7 +10461,10 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
const initialized = await Promise.all(
|
const initialized = await Promise.all(
|
||||||
placeholders.map(async (placeholder, i) => {
|
placeholders.map(async (placeholder, i) => {
|
||||||
try {
|
try {
|
||||||
return await this.initializeImage(placeholder, imageFiles[i]);
|
return await this.initializeImage(
|
||||||
|
placeholder,
|
||||||
|
await normalizeFile(imageFiles[i]),
|
||||||
|
);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
this.setState({
|
this.setState({
|
||||||
errorMessage: error.message || t("errors.imageInsertError"),
|
errorMessage: error.message || t("errors.imageInsertError"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user