Skip to content

Backblaze B2 Storage

Robin Rodricks edited this page Jul 8, 2026 · 2 revisions

In order to use Backblaze B2 storage you need to reference NuGet package first. The provider wraps around the standard AWS SDK which is updated regularly, but adds a lot of untrivial workarounds that makes your life painless.

Connect to Backblaze B2

You can use the Backblaze B2 method to connect to Backblaze B2 storage servers (S3 compatible).

IBlobStorage storage = StorageFactory.Blobs.BackblazeB2(
    accessKeyId, secretAccessKey, bucketName, region);

Connection Strings

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

StorageFactory.Modules.UseAwsStorage();

Then construct using the following format:

IBlobStorage storage = StorageFactory.Blobs.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).

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

Native operations are exposed via IAwsS3BlobStorageNativeOperations interface.

Clone this wiki locally