b2DownloadFileById: Download B2 File by ID.

Description Usage Arguments Details Value Examples

Description

b2DownloadFileById downloads a file from the user's account on the Backblaze B2 cloud storage product.

Usage

1
b2DownloadFileById(fileId, overwrite = FALSE)

Arguments

fileId

The unique identifier of the file to be downloaded. File IDs may be obtained through the b2ListFiles, b2ListFileVersions and b2UploadFile functions in this package.

overwrite

Binary TRUE or FALSE decision to overwrite any files in the current working directory, whose names match the downloaded file name.

Details

This function downloads a file from the user's account on the Backblaze B2 cloud storage product using the file's unique ID only. Files of the same name may have multiple versions stored on B2. Therefore, every file version will have a unique ID, which can be used for downloading that specific version. Further details regarding this API call are available here:

https://www.backblaze.com/b2/docs/b2_download_file_by_id.html

fileId is mandatory and must be user defined. overwrite is optionally user defined and defaults to FALSE.

Value

If successful the response headers include the Content-Type that was specified when the file was uploaded. They also include the X-Bz-FileName and X-Bz-Content-Sha1 headers. The X-Bz-FileName uses percent-encoding, as if it were a URL parameter. If successful, the file will be downloaded to the current working directory.

Examples

1
2
3
4
5
## Not run: 
b2DownloadFileById(fileId = "Unique_identifier_of_the_file_to_download",
overwrite = TRUE)

## End(Not run)

phillc73/backblazer documentation built on May 25, 2019, 5:05 a.m.