fix: svg+xml image type ext not assigned properly (#3774)
This commit is contained in:
committed by
GitHub
parent
973cfc3fa3
commit
d1b01d28e6
@@ -119,7 +119,7 @@ const downloadImageNode = async (node: ProsemirrorNode) => {
|
||||
const image = await fetch(node.attrs.src);
|
||||
const imageBlob = await image.blob();
|
||||
const imageURL = URL.createObjectURL(imageBlob);
|
||||
const extension = imageBlob.type.split("/")[1];
|
||||
const extension = imageBlob.type.split(/\/|\+/g)[1];
|
||||
const potentialName = node.attrs.alt || "image";
|
||||
|
||||
// create a temporary link node and click it with our image data
|
||||
|
||||
Reference in New Issue
Block a user