Skip to main content
Version: 5.7.0

MoveFile

Move a file.

ServiceOperation
groupFileMOVE_FILE

Method Parameters

ParameterDescription
groupIdThe id of the group.
fileIdThe id of the file.
versionThe target version of the file.
newTreeIdThe id of the destination folder.
treeVersionThe target version of the folder tree.
newFilenameThe optional new file name.
overwriteIfPresentWhether to allow overwrite of an existing file if present.

Usage

http://localhost:3000
string groupId = "dfsfsffsd";
string fileId = "xxxx";
int version = 1;
string newTreeId = "guid";
int treeVersion = 1;
string newFilename = "gfile";
bool overwriteIfPresent = true;
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.GroupFileService.MoveFile(groupId, fileId, version, newTreeId, treeVersion, newFilename, overwriteIfPresent, successCallback, failureCallback);
JSON Response
{
"data": {
"fileDetails": {
"treeId": "fb3431cd-6e2f-47f1-8100-8941abf6bb4f",
"fileName": "glognewname.json",
"fileSize": 7051,
"dateUploaded": 1677521119000,
"etag": "a6f4cd3c065aed36227d3582adc5d952",
"acl": {
"member": 2,
"other": 0
},
"version": 2,
"url": "https://api.internal.braincloudservers.com/groupfiles/bc/g/23782/gr/2bf538d1-19ea-4e14-9862-f979215e09b7/fb3431cd-6e2f-47f1-8100-8941abf6bb4f/6d938c22-3b8c-4b99-a913-2edafed71a83/V2/glogcopy.json",
"fileId": "6d938c22-3b8c-4b99-a913-2edafed71a83"
},
"groupId": "2bf538d1-19ea-4e14-9862-f979215e09b7"
},
"status": 200
}