put
https://api.duodeal.app/api/medias/
Updates an existing media file by its ID.
You can update the file metadata (name, folder) or replace the file content entirely.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Media unique identifier |
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | File name with extension |
mime | string | No | MIME type (required if replacing file) |
folder | string | No | Folder/category for organization |
file | string | No | Base64-encoded file data to replace the file |
Response Fields
| Field | Type | Description |
|---|---|---|
id | integer | Media unique identifier |
name | string | File name |
url | string | Public URL to access the file |
mime | string | MIME type |
folder | string | Folder/category |
path | string | Storage path |
thumbnail | string | Thumbnail URL |
thumbPath | string | Thumbnail storage path |
createdAt | datetime | Creation timestamp |
updatedAt | datetime | Last update timestamp |
Response
200 OK: Media successfully updated400 Bad Request: Invalid request body or validation error401 Unauthorized: Invalid or missing API key404 Not Found: Media not found
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
200Resource updated
400Bad request
401Unauthorized
404Resource not found
