Skip to content

CopyPart

Craig edited this page Jan 1, 2024 · 1 revision

How To Use

<?php

use TechKat\BackBlazeB2\Client;

$keyID = '...';
$applicationKey = '...';

$client = new Client($keyID, $applicationKey);

$response = $client->copyPart([
  'sourceFileId' => 'SOURCE_FILE_ID',
  'largeFileId' => 'LARGE_FILE_ID',
  'partNumber' => 'PART_NUMBER',
]);

return $response;

Expected Result

{
  "fileId": "FILE_ID_FOR_PART_NUMBER",
  "partNumber": "PART_NUMBER",
  "contentLength": 1234567890,
  "contentSha1": "76d4069a4755988aea481f79cdc4b6e72f0e56b2",
  "contentMd5": "387235e8de7f13e4fc60bb9316be4986",
  // ...
}

Backblaze B2 API Documentation

https://www.backblaze.com/apidocs/b2-copy-part