Storyden
Assets

Asset Upload

Upload and process a media file.

POST
/assets

Upload and process a media file.

Authorization

cookiestoryden-session<token>

Query Parameters

filename?string

The client-provided file name for the asset.

parent_asset_id?string

For uploading new versions of an existing asset, set this parameter to the asset ID of the parent asset. This must be an ID and not a filename. This feature is used for situations where you want to replace an asset in its usage context, but retain the original with a way to reference it for features such as editable/croppable images or file version history.

Header Parameters

Content-Length*integer

Body content length in bytes.

Request Body

Upload a file.

body?fileapplication/octet-stream
Formatbinary

Response Body

The new URL of an uploaded file.

application/json
  1. response
id*AssetID

A unique identifier for this resource.

Formatxid
filename*string
path*string

The API path of the asset, conforms to the schema's GET /assets.

mime_type*string
width*number
height*number
parent?
Example Request
curl -X POST 'https://example.com/api/assets' \  -H 'Content-Length: 0' \  -H 'Content-Type: application/octet-stream' \  -d 'string'
Example Response
{  "id": "string",  "filename": "string",  "path": "string",  "mime_type": "string",  "width": 0,  "height": 0,  "parent": {}}