GetFileInfo
Returns information about the specified file.
Service | Operation |
---|---|
globalFileV3 | GET_FILE_INFO |
Method Parameters
Parameter | Description |
---|---|
fileId | File ID |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string fileId = "hjvfsghguhuhrtghgh";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.GlobalFileService.GetFileInfo(fileId, successCallback, failureCallback);
const char *fileId = "hjvfsghguhuhrtghgh";
_bc->getGlobalFileService()->getFileInfo(fileId, this);
NSString *fileId = @"hjvfsghguhuhrtghgh";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc globalFileService] getFileInfo:fileId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String fileId = "hjvfsghguhuhrtghgh";
this; // implements IServerCallback
_bc.getGlobalFileService().getFileInfo(fileId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var fileId = "hjvfsghguhuhrtghgh";
_bc.globalFile.getFileInfo(fileId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var fileId = "hjvfsghguhuhrtghgh";
ServerResponse result = await _bc.globalFileV3Service.getFileInfo(fileId:fileId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var fileId = "hjvfsghguhuhrtghgh";
var globalFileProxy = bridge.getGlobalFileV3ServiceProxy();
var postResult = globalFileProxy.getFileInfo(fileId);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalFileV3",
"operation": "GET_FILE_INFO",
"data": {
"fileId": "hjvfsghguhuhrtghgh"
}
}
JSON Response
{
"status": 200,
"data": {
"fileDetails": {
"fileId": "4d0b8945-41f8-4a2b-a2f5-e9c0b2482bc6",
"treeId": "ff81c691-5683-4aa0-addb-6f89ecd3ce75",
"fileName": "sub12file1",
"contentMd5": "0snE+wsqo2XeseZbT5kLyQ==",
"fileSize": 64,
"dateUploaded": 1586975354000,
"etag": "d2c9c4fb0b2aa365deb1e65b4f990bc9",
"version": 1,
"url": "https://api.braincloudservers.com/files/bc/g/23302/f/xxxx-xxx-xxx-xxx/yyy-yyy-yyy-yyy/V1/sub12file1"
}
}
}