Skip to main content

Replace Asset Content

POST 

/api/v1/assets/:asset_id/content/original/replace

API to replace the original content file of an asset while keeping the Asset ID unchanged.

Different host for uploads

This endpoint is served on https://upload.filespin.io — not the standard https://app.filespin.io host used by the rest of the API. Make sure your client targets the upload host for this request.

Note: For replacing files from within web pages, use the File Picker in Replace mode. To add or update custom metadata for the asset during replace, see Adding metadata to the asset.

HTTP RESPONSE

KeyValueDescription
filesJSONList of files
idstringAsset ID, 32 character alphanumeric UUID
namestringFile name
sizeintegerSize of file in bytes
checksumstringMD5 checksum
content_typestringMIME type
providerstringalways "local" to indicate local upload
successbooleantrue if upload completed, false otherwise
metadataJSONOnly returned for custom plans. Applies to image uploads. Where available, Exiftool tag values for 'ColorMode', 'ColorSpace', 'Orientation', 'Make' and 'Model' are returned. 'Width' and 'Height' are always returned

Response JSON

{
"files": [
{
"id": "99d819953914402babbdeb68337ea6a3",
"name": "sample.jpg",
"size": 8836363,
"checksum": "5f5f26bd7c0f62c6e02e44c73d09734e",
"content_type": "image/jpeg",
"metadata": {
"Make": "Apple",
"ColorSpace": "sRGB",
"Model": "iPhone 3G",
"Orientation": "Horizontal (normal)",
"width": 1200,
"height": 800
}
}
],
"success": true,
"provider": "local"
}

Request

Responses

Asset content replaced successfully