u
This commit is contained in:
@@ -576,7 +576,7 @@ _none_
|
||||
- Params: `query: lastChangedProduct?: str, limit?: int`
|
||||
- Returns: `200 obj[]`
|
||||
#### Get a virtual filesystem file — `GET /vfs/{*path}`
|
||||
- Params: `path: str, query: download?: bool`
|
||||
- Params: `path: str, query: download?: bool, raw?: bool`
|
||||
- Returns: `200 str`
|
||||
#### List warehouses — `GET /warehouse`
|
||||
_none_
|
||||
|
||||
@@ -461,7 +461,7 @@ _none_
|
||||
- Params: `body: { si: str, basesi: str, basesifactor: num, symbol: str, name: str }`
|
||||
- Returns: `200 { unit: { si: str, basesi: str, basesifactor: num, symbol: str, name: str } }`
|
||||
#### Get a virtual filesystem file — `GET /vfs/{*path}`
|
||||
- Params: `path: str, query: download?: bool`
|
||||
- Params: `path: str, query: download?: bool, raw?: bool`
|
||||
- Returns: `200 str`
|
||||
#### List warehouses — `GET /warehouse`
|
||||
_none_
|
||||
|
||||
@@ -8,14 +8,12 @@ Returns a file the model produced in the `javascript_execute` sandbox
|
||||
(virtual filesystem), for the authenticated user's selected company.
|
||||
|
||||
Embed the returned URL in chat markdown to display a generated image:
|
||||
``. *
|
||||
Images are ALWAYS returned as a preview: scaled to fit inside a 250x250 box with the
|
||||
aspect ratio preserved (never stretched), and anything smaller than 100 px on its larger
|
||||
edge is upscaled to 100 px. The preview carries a translucent strip along the bottom
|
||||
edge listing the ORIGINAL width, height, file size, MIME type and filename. *
|
||||
Only image MIME types the sandbox produces are rendered inline; every other file
|
||||
type is sent with `Content-Disposition: attachment` so it downloads rather than
|
||||
being interpreted as a document in the app's origin.
|
||||
``.
|
||||
|
||||
Images are returned as a 250x250 aspect-preserving preview unless requested with
|
||||
`download=1` or `raw=1`.
|
||||
Browser-compatible files (HTML, CSS, JS, JSON, PDF, text, images, media) are served
|
||||
inline so they open directly in the browser; other files are sent as downloads.
|
||||
|
||||
|
||||
## Path parameters
|
||||
@@ -28,10 +26,9 @@ being interpreted as a document in the app's origin.
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `download` | no | boolean | Return the original, unmodified file instead of the standard preview.
|
||||
Without this parameter images are always served as a 250x250 aspect-preserving
|
||||
preview with a metadata strip. Ignored for non-image files, which are always
|
||||
served as-is.
|
||||
| `download` | no | boolean | Force file download with Content-Disposition: attachment.
|
||||
|
|
||||
| `raw` | no | boolean | Return original unmodified image inline without generating a preview thumbnail.
|
||||
|
|
||||
|
||||
## Response `200`
|
||||
|
||||
Reference in New Issue
Block a user