mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-26 10:49:57 +02: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:
@@ -10461,7 +10461,10 @@ class App extends React.Component<AppProps, AppState> {
|
||||
const initialized = await Promise.all(
|
||||
placeholders.map(async (placeholder, i) => {
|
||||
try {
|
||||
return await this.initializeImage(placeholder, imageFiles[i]);
|
||||
return await this.initializeImage(
|
||||
placeholder,
|
||||
await normalizeFile(imageFiles[i]),
|
||||
);
|
||||
} catch (error: any) {
|
||||
this.setState({
|
||||
errorMessage: error.message || t("errors.imageInsertError"),
|
||||
|
Reference in New Issue
Block a user