This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
III.2.c. Files
Andrey Bogdanov edited this page Feb 25, 2016
·
3 revisions
/api/fileInfo.json?fileName=<fileName>
or
/api/fileInfo.json?fileHash=<fileHash>
Returns information about the file specified by file name or file hash.
Example
/api/fileInfo.json?fileName=1456384996455.jpg
{
"dimensions": {
"width": 640,
"height": 480
},
"extraData": null,
"hash": "91a64854f92199c5175d8bc9bb399382e04937b2",
"mimeType": "image/jpeg",
"name": "1456384996455.jpg",
"rating": "SFW",
"size": 61366,
"thumb": {
"dimensions": {
"width": 200,
"height": 150
},
"name": "1456384996455s.jpg"
},
"boardName": "b",
"postNumber": 29552
}
On any error, an error object is returned.
Example:
/api/fileInfo.json?fileName=1456384996455.jpeg
{
"title": "Error",
"errorMessage": "Error",
"errorDescription": "No such file"
}
/api/fileExistence.json?fileName=<fileName>
or
/api/fileExistence.json?fileHash=<fileHash>
Returns a boolean
true
if the file specified by file name or file hash exists on the server, otherwise returns boolean
false
.
Example
true
On an internal error, an error object is returned.