Replace Asset File
Replaces the existing file of a specified asset with a new file upload. This operation keeps the same asset ID but updates the stored content and metadata such as size and type. Authentication is required to ensure the user’s permission.
https://api.cortado.com/v1/assets/{asset_id}/replace
Request
Accepts multipart/form-data
with the new file under the file
field. The asset ID is passed in the path parameter.
Body Parameters
Parameters | Type | Description |
---|---|---|
| file | New file to replace the asset’s existing file |
Based on the steps above, your code might look something like this. It brings together the key concepts covered — from setup and configuration to routing, authentication, or event handling. Feel free to adapt it to suit your specific use case.
Response
Returns updated asset metadata including new size, type, and upload timestamp. If the asset ID is invalid or unauthorized, returns an error.
Last updated on
Jul 21, 2025