Docs · GET /file/{dirId}/{fileName}
Reference · Files

GET/file/{dirId}/{fileName}

Returns an uploaded file’s path, type and size. Use it to check that an upload arrived.

Parameters

Parameters
dirIdstringThe directory’s id.
fileNamestringThe file’s name, URL-encoded if it holds characters a path can’t.

Request body

This request has no body.

Example

Request
curl https://media.logicboostkit.com/file/dir_pi23jgy1yxlmigi873bz/source.mp4 \
  -H "Authorization: Basic $MEDIA_KEY"
Response
HTTP/1.1 200 OK
X-Request-Id: job_0mv6hnzdy93wuugau1rys4cn

{
  "ok": true,
  "file_info": {
    "file_path": "dir_pi23jgy1yxlmigi873bz/source.mp4",
    "file_type": "video/mp4",
    "file_size": 1937244979
  }
}

Response fields

Response fields
okbooleantrue when the file exists.
file_info.file_pathstringdir_id/file_name.
file_info.file_typestring | nullThe file’s MIME type, from its extension; failing that, the Content-Type it was uploaded with; otherwise null.
file_info.file_sizenumberThe file’s size in bytes.

Status codes

Status codes
200The file exists. Not charged.
401The Authorization header is missing, or the key is invalid, revoked or expired.
403The account isn’t active. The error says what to do.
404File not found: the file or its directory isn’t in your account, the directory has expired, or nothing has been uploaded under that name yet.
429More than 300 requests in a minute on this key. Wait for the number of seconds in Retry-After.

Every error has the shape {"ok": false, "error": "…"} and is never charged.