Upload files
Uploads one or more binary assets as `multipart/form-data` under the field name `files`. Images are stored, processed for width variants and given a BlurHash. This is the first half of a `media` import: upload the images here, then pass the returned ids as `file_ids` to `POST /api/imports`.
Uploads one or more binary assets as multipart/form-data under the
field name files. Images are stored, processed for width variants and
given a BlurHash.
This is the first half of a media import: upload the images here, then
pass the returned ids as file_ids to POST /api/imports.
Authorization
bearerAuth A Clerk session JWT. Obtain one with a Clerk frontend SDK
(session.getToken()) or, for server-to-server use, with a Clerk
machine token. The token's sub claim is the Flambe user id that scopes
every request.
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/files"{ "files": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_id": "string", "url": "http://example.com", "content_type": "image/jpeg", "size": 0, "width": 0, "height": 0, "blur_hash": "string", "created_at": "2019-08-24T14:15:22Z" } ]}Stream file metadata POST
The same resolution as `/metadata/query`, delivered as newline-delimited JSON (`application/x-ndjson`) so a client can render the first records without waiting for the whole batch. One JSON object per line.
Append items to a grocery list POST
Adds items without rewriting the list. Lines that match an existing item are merged rather than duplicated.