DELETE /file /{dirId} /{fileName}
Deletes a file now, without waiting for its directory to expire. It can’t be undone.
Parameters
| dirId | string | The directory’s id. |
|---|---|---|
| fileName | string | The file’s name, URL-encoded if it holds characters a path can’t. |
Request body
This request has no body.
Example
Request
curl -X DELETE https://media.logicboostkit.com/file/dir_pi23jgy1yxlmigi873bz/source.mp4 \
-H "Authorization: Basic $MEDIA_KEY"Response
HTTP/1.1 200 OK
X-Request-Id: job_0mv6ihz6vfx5ua0h05x8bmql
{
"ok": true,
"deleted": {
"file_path": "dir_pi23jgy1yxlmigi873bz/source.mp4"
}
}Response fields
| ok | boolean | true when the file was deleted. |
|---|---|---|
| deleted.file_path | string | The file that is gone: dir_id/file_name. |
Status codes
| 200 | The file is deleted. Not charged. |
|---|---|
| 401 | The Authorization header is missing, or the key is invalid, revoked or expired. |
| 403 | The account isn’t active. The error says what to do. |
| 404 | File not found: the file or its directory isn’t in your account, or the directory has expired. |
| 429 | More than 300 requests in a minute on this key. Wait for the number of seconds in Retry-After. |