Files
Public file
The permanent address of a file made public, with optional resized versions.
GET
https://app.getera.io/api/files/public/{id}None (public)
When you make a file a Public asset in Files, anyone with this address can open it: shop images, e-mails, PDFs. The moment you make it private again, the link stops working everywhere at once. See Files.
Authentication
None. If the file is not public, you get 404.
Path parameter
| Name | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The file's id. The file's detail shows it together with the public address. |
Query parameter
| Name | Type | Required | Description |
|---|---|---|---|
size | string | No | thumb, card or preview. Applies only to images that can be resized; SVG, PDF and video always come whole. |
Example
<img src="https://app.getera.io/api/files/public/2b9e4f70-0000-4000-8000-000000000030?size=card" alt="Product image" />curl -O https://app.getera.io/api/files/public/2b9e4f70-0000-4000-8000-000000000030Response
The file itself, with a Content-Type that matches it. The original file is served to open in the browser (inline) under its original name. Responses may be cached for a year: the content behind one id never changes, and a new upload gets a new id.
Errors
| Status | When |
|---|---|
404 | No such file, not public, or the id is not a UUID. Body {"error": "Not found"}. |
500 | The file could not be read. |