diff --git a/apxtri/models/Checkjson.js b/apxtri/models/Checkjson.js index 4dcc3f9..835179f 100755 --- a/apxtri/models/Checkjson.js +++ b/apxtri/models/Checkjson.js @@ -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: / /, diff --git a/apxtri/models/Odmdb.js b/apxtri/models/Odmdb.js index 679503b..a6d8d26 100644 --- a/apxtri/models/Odmdb.js +++ b/apxtri/models/Odmdb.js @@ -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);