Vanessa 2025-04-21 11:37:54 +08:00
parent 834a736293
commit 72a2138ba1

View File

@ -1101,12 +1101,12 @@ export class Toolbar {
const exportImg = () => { const exportImg = () => {
const msgId = showMessage(window.siyuan.languages.exporting, 0); const msgId = showMessage(window.siyuan.languages.exporting, 0);
if (renderElement.getAttribute("data-subtype") === "plantuml") { if (renderElement.getAttribute("data-subtype") === "plantuml") {
fetch(renderElement.querySelector("img").getAttribute("src")).then(function (response) { fetch(renderElement.querySelector("object").getAttribute("data")).then(function (response) {
return response.blob(); return response.blob();
}).then(function (blob) { }).then(function (blob) {
const formData = new FormData(); const formData = new FormData();
formData.append("file", blob); formData.append("file", blob);
formData.append("type", "image/png"); formData.append("type", "image/svg+xml");
fetchPost("/api/export/exportAsFile", formData, (response) => { fetchPost("/api/export/exportAsFile", formData, (response) => {
openByMobile(response.data.file); openByMobile(response.data.file);
hideMessage(msgId); hideMessage(msgId);