Merge pull request #1140 from keyboardstaff/bugfix

This commit is contained in:
Jan Tomášek 2026-02-26 09:01:55 +01:00 • committed by GitHub
commit 09caf3e2bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -260,7 +260,7 @@ const model = {
// Generate server-side API URL for file (for device sync)
getServerImgUrl(filename) {
return `/image_get?path=/a0/usr/uploads/${encodeURIComponent(filename)}`;
return `/api/image_get?path=/a0/usr/uploads/${encodeURIComponent(filename)}`;
},
getServerFileUrl(filename) {

View file

@ -237,7 +237,7 @@ const model = {
},
getAttachmentUrl(filename) {
return `/image_get?path=/a0/usr/uploads/${encodeURIComponent(filename)}`;
return `/api/image_get?path=/a0/usr/uploads/${encodeURIComponent(filename)}`;
},
};

View file

@ -1723,7 +1723,7 @@ function drawKvpsIncremental(container, kvps, latex) {
if (typeof value === "string" && value.startsWith("img://")) {
const imgElement = document.createElement("img");
imgElement.classList.add("kvps-img");
imgElement.src = value.replace("img://", "/image_get?path=");
imgElement.src = value.replace("img://", "/api/image_get?path=");
imgElement.alt = "Image Attachment";
tdiv.appendChild(imgElement);
@ -1789,7 +1789,7 @@ function convertHTML(str) {
}
function convertImgFilePaths(str) {
return str.replace(/img:\/\//g, "/image_get?path=");
return str.replace(/img:\/\//g, "/api/image_get?path=");
}
function convertFilePaths(str) {