-
Notifications
You must be signed in to change notification settings - Fork 1
CopyFile
Craig edited this page Jan 1, 2024
·
7 revisions
<?php
use TechKat\BackBlazeB2\Client;
$keyID = '...';
$applicationKey = '...';
$client = new Client($keyID, $applicationKey);
$response = $client->copyFile([
'sourceFileId' => '4_za71f544e781e6891531b001a_f200ec353a2184825_d20160409_m004829_c000_v0001016_t0028',
'destinationBucketId' => 'BUCKET_ID',
'fileName' => 'a_file_name.ext',
]);
return $response;
{
"accountId": "YOUR_ACCOUNT_ID",
"action": "copy",
"bucketId": "BUCKET_ID",
"contentLength": 123456789,
"contentSha1": "c604542967a93466d4ed087956753161cfab3f31",
"contentMd5": "dc724af18fbdd4e59189f5fe768a5f8311527050",
"contentType": "type/format",
"fileId": "4_zabcd123456efghijk7890_f123ab456a7890123_d20240101_m004829_c000_v0001016_t0028",
"fileName": "a_file_name.ext",
// ...
}
Below is a list of all the available native API endpoints that this library currently supports:
- cancelLargeFile
- copyFile
- copyPart
- createBucket
- createKey
- deleteBucket
- deleteFileVersion
- deleteKey
- downloadFileById
- downloadFileByName
- finishLargeFile
- getDownloadAuthorization
- getFileInfo
- getUploadPartUrl
- getUploadUrl
- hideFile
- listBuckets
- listFileNames
- listFileVersions
- listKeys
- listParts
- listUnfinishedLargeFiles
- startLargeFile
- updateBucket
- updateFileLegalHold
- updateFileRetention
- uploadFile
- uploadPart