post https://{app}.{filespin}.{io}/api/v1/assets//content/original/replace
API to replace the original content file of an asset while keeping the Asset ID unchanged.
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
Key | Value | Description |
---|---|---|
files | JSON | List of files |
id | string | Asset ID, 32 character alphanumeric UUID |
name | string | File name |
size | integer | Size of file in bytes |
checksum | string | MD5 checksum |
content_type | string | MIME type |
provider | string | always "local" to indicate local upload |
success | boolean | true if upload completed, false otherwise |
metadata | JSON | Only 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"
}