Fix url path

This commit is contained in:
2024-08-08 22:10:55 -04:00
parent 1db7b2b4ad
commit 04a5dd62b6
2 changed files with 6 additions and 6 deletions

View File

@ -148,8 +148,12 @@ function snap() {
const fsx = elem.offsetLeft - col
const fsy = elem.offsetTop - cot
const [sx, sy, ex, ey] = cpie.get().points;
const imageFile = (() => {
const u = new URL(elem.dataset.collageImageUrl)
return u.pathname.slice("/photos/".length)
})();
const photo = {
image: elem.dataset.collageImageUrl.slice("images/".length),
image: imageFile,
crop: {
start: {
x: parseInt(sx),