Skip to content

Backblaze B2 Storage

Robin Rodricks edited this page Jul 15, 2026 · 3 revisions

In order to use Backblaze B2 storage you need to reference the FluentStorage.AWS package first. The provider wraps around the standard AWS SDK.

Connect to Backblaze B2

You can use the BackblazeB2Storage factory class to connect to Backblaze B2 storage servers (S3 compatible).

IStore store = BackblazeB2Storage.FromCredentials(
    accessKeyId, secretAccessKey, bucketName, region);

Connect using Connection Strings

To create with a connection string, first reference the module:

AwsS3Storage.Use();

Then construct using the following format:

IStore store = StorageFactory.FromConnectionString("backblaze.b2://keyId=...;key=...;bucket=...;region=...");

where:

  • keyId is (optional) access key ID.
  • key is (optional) secret access key.
  • bucket is bucket name.
  • region is the Bucket region (e.g. us-west-004).

Perform storage operations

Use our simple polycloud API to perform file and object manipulation operations.

AWS CLI Profile Support

If you already have credentials in the local credentials file generated by AWS CLI, you can also use them to connect to a bucket with FluentStorage. Look here for more details.

Native operations

Call the IStore.GetClient() method to return the native SDK client and perform any native operations.

Clone this wiki locally