pawcoding / astro-loader-pocketbase

A content loader for Astro that uses the PocketBase API
https://www.npmjs.com/package/astro-loader-pocketbase
MIT License
1 stars 0 forks source link

Handle images #3

Open pawcoding opened 6 days ago

pawcoding commented 6 days ago

Requirements

Currently relations and files are treated like normal strings in the schema parser. While this is technically correct, the string needs to be transformed to a proper URL containing not only the filename but also the id of the entry / row.

Unfortunately when building out the schema, we don't yet have the id of the entry, so a static transformer using zod is not possible. At least I currently don't know how.

The end goal of this issue is to update the parseEntry function, so that filenames are automatically transformed to contain the full url.