Get file URL
get_file_urlGenerate public URLs for PocketBase file fields, supporting thumbnails, forced downloads, and short-lived access tokens for protected files.
Instructions
Build the public URL for a file stored in a record's file field. For image files you may request a thumbnail via thumb (e.g. '100x100', '100x100t', '0x100'). For protected files (collection with a non-public file field), set protected to true to embed a short-lived access token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thumb | No | Thumbnail size, e.g. '100x100', '0x100', '100x100t'. | |
| download | No | Force a download (Content-Disposition attachment). | |
| filename | Yes | Stored file name (the value of the file field). | |
| recordId | Yes | Record id. | |
| protected | No | Embed a file access token for protected files. | |
| collection | Yes | Collection id or name. |