eallion / memos.top

✍ A static page rendered with the Memos API.
https://memos.top
Other
208 stars 93 forks source link

Will this work if my images are “local”? #12

Closed simplelifelfk closed 1 year ago

simplelifelfk commented 1 year ago

I started my memos instance over, and chose “local” for my storage. I can see the image files on the file system.

When I attempt to view the static page though, my images do not show up. Just empty boxes.

gitkeniwo commented 1 year ago

I have the same problem. Currently, the resource links are not correctly parsed for resources that are stored in local sqlite database. Maybe this is probably because new versions of Memo introduce a new way to generate URL for resources? e.g. I have an image in local storage whose link should be my.site/o/r/33/3a95dc1c-d075-47a2-81c0-a4548ce45b36, but the memos.top currently wrongly parses it as mysite/o/r/33/3D002F7A-534D-4194-8735-798B2F2C54D5.jpeg Should be easy to fix.

eallion commented 1 year ago

The code in this file parses the local files.

https://github.com/eallion/memos.top/blob/main/assets/js/main.js#L171-L200

Memos has changed the rules several times in recent versions.

eallion commented 1 year ago

Fixed. https://github.com/eallion/memos.top/commit/da8e7b098bf9a65af946f9d8a4895911adc5d205

@simplelifelfk @gitkeniwo