Backblaze / b2-sdk-java

The official Java SDK for using Backblaze's B2 Storage APIs
Other
93 stars 26 forks source link

Missing implementation for b2_copy_part #111

Closed dkocher closed 4 years ago

tiwijo commented 4 years ago

Hello, are you possibly looking for a method in B2StorageClient called something like copyPart()?

If no, could you clarify what you mean by a missing implementation?

If yes, then I encourage you to take a look at the storeLargeFile() method in B2StorageClient. It allows you to specify where each part of your new large file is coming from. We already support the following cases

  1. The part is already uploaded to B2 (use the B2AlreadyStoredPartStorer)
  2. The part needs to be uploaded from the client (use the B2UploadingPartStorer)
  3. The part needs to be copied from an existing B2 files (use the B2CopyingPartStorer)

We have an example that splices some new bytes into the middle of a new large file by uploading a part into the middle, where the head and the tail are copied from existing sources. See SpliceLargeFile for that.

Hope this helps! Looking forward to hearing back from you.

dkocher commented 4 years ago

Thanks for the swift reply despite my sparse ticket. B2CopyingPartStorer is what I was looking for. In particular I wanted to have a look because the range request parameter is not properly documented in https://www.backblaze.com/b2/docs/b2_copy_part.html