save relative path for image instead apbsolute

This commit is contained in:
philc 2024-12-16 09:57:24 +01:00
parent 885ee08d4c
commit 821cbf7aa4
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ Checkjson.schema.properties.format = {
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
"idn-email": / /,
uuid: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,
uri: / /,
uri: /^((https?|ftp):\/\/)?([a-zA-Z0-9.-]+)(:[0-9]{1,5})?(\/[^\s]*)?$/,
url: /^(?:(?:https?|ftp):\/\/)(?:\w+(?::\w+)?@)?(?:(?:[a-z0-9-\.]+\.[a-z]{2,})(?:[-a-z0-9+\._\%\!\\[\]\(\)\,\*\?\&\=\:]*){1,})|(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?))(?:[:\/#][^#]*)?$/,
"uri-reference": / /,
iri: / /,

View File

@ -709,7 +709,7 @@ Odmdb.cud = (objectPathname, crud, itm, role, runindex = true) => {
);
} else {
const objectname = objectPathname.split("/").slice(-1)[0];
itmtostore[newk] = `/objectimg/${objectname}${filenameimg}`;
itmtostore[newk] = `objectimg/${objectname}${filenameimg}`;
//const webp = require("webp-converter");
//const buf = Buffer.from(itmtostore[k], 'base64');
//const imgwebp = await webp.bufferToWebp(buf);