mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
This commit is contained in:
parent
31f8e725dd
commit
7140675181
@ -160,6 +160,8 @@ export async function processPastedHtml(html: string) {
|
|||||||
const createdResource = await shim.createResourceFromPath(imageFilePath);
|
const createdResource = await shim.createResourceFromPath(imageFilePath);
|
||||||
mappedResources[imageSrc] = `file://${encodeURI(Resource.fullPath(createdResource))}`;
|
mappedResources[imageSrc] = `file://${encodeURI(Resource.fullPath(createdResource))}`;
|
||||||
}
|
}
|
||||||
|
} else if (imageSrc.startsWith('data:')) { // Data URIs
|
||||||
|
mappedResources[imageSrc] = imageSrc;
|
||||||
} else {
|
} else {
|
||||||
const filePath = `${Setting.value('tempDir')}/${md5(Date.now() + Math.random())}`;
|
const filePath = `${Setting.value('tempDir')}/${md5(Date.now() + Math.random())}`;
|
||||||
await shim.fetchBlob(imageSrc, { path: filePath });
|
await shim.fetchBlob(imageSrc, { path: filePath });
|
||||||
|
Loading…
Reference in New Issue
Block a user