Delete Media File
DELETE/v1/media/files/:path
Delete the media file at the given path.
Discover adapter IDs through /media/adapters; local-images is site configuration, not a universal ID. /media/files/{path}/ lists a directory; the same path without the trailing slash reads one item. Use JSON rather than multipart. For files, provide base64 content; for folders, omit it. PATCH requires at least path or content; explicitly set override: false to forbid overwriting. Allowed extensions, MIME types, sizes and operations depend on Media Manager and adapter settings.
The media models return the retrieved set without standard page slicing; do not use page[limit] to infer completeness. File lists support filter[search] and search_recursive. The url, temp and content query flags select optional URL, temporary URL or encoded-content attributes where the adapter supports them. The base edit check requires core.manage and record core.edit, or core.edit.own with a matching owner; component overrides take precedence. Omitted SERVER_UTC/USER_UTC calendar values are restored from the stored UTC values after validation, avoiding a second timezone conversion.
Request
Responses
- 204
- 400
- 401
- 403
- 404
- 406
- 500
Deleted; no response body is required.
Invalid parameters, form validation or save failure.
Missing or invalid API authentication.
Access denied by ACL.
Route, record or task not found.
Unsupported Accept header.
Model or server error.