DeQmaTech.BackBlazeSDK 1.8.4

BackBlazeSDK is a .Net library for BackBlaze.com file hosting service.

Install-Package DeQmaTech.BackBlazeSDK -Version 1.8.4
dotnet add package DeQmaTech.BackBlazeSDK --version 1.8.4
<PackageReference Include="DeQmaTech.BackBlazeSDK" Version="1.8.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DeQmaTech.BackBlazeSDK --version 1.8.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Features

  • [x] Assemblies for .NET 4.5.2 and .NET Standard 2.0 and .NET Core 2.1
  • [x] Just one external reference (Newtonsoft.Json)
  • [x] Easy installation using NuGet
  • [x] Upload/Download tracking support
  • [x] Proxy Support
  • [x] Upload/Download cancellation support
  • [ ] Support Upload/Download pause/resume

List of functions:

  • ListBuckets
  • List
  • Upload
  • FileMetadata
  • DeleteBucket
  • CreateBucket
  • CopyFile
  • DeleteFile
  • UpdateBucket
  • PublicBucket_DownloadFile
  • PublicBucket_DownloadFileAsStream
  • PrivateBucket_DownloadFile
  • PrivateBucket_DownloadFileAsStream
  • PublicBucket_GetDirectUrl

Code simple:

Dim tkn = Await BackBlazeSDK.Authentication.GetToken_24Hrs("key_id", "app_id")
Dim cLENT As BackBlazeSDK.IClient = New BackBlazeSDK.BClient(tkn.apiUrl, tkn.authorizationToken, New BackBlazeSDK.ConnectionSettings With {.CloseConnection = True, .TimeOut = TimeSpan.FromMinutes(80), .Proxy = New BackBlazeSDK.ProxyConfig With {.SetProxy = True, .ProxyIP = "127.0.0.1", .ProxyPort = 80, .ProxyUsername = "user", .ProxyPassword = "123456"}})

Await cLENT.ListBuckets(tkn.accountId)
Await cLENT.List("bucket_id")
Await cLENT.CopyFile("file_id", "bucket_id", "mypic.jpg")
Await cLENT.CreateBucket(tkn.accountId, "bucket_name", BackBlazeSDK.Utilitiez.BucketTypesEnum.allPublic)
Await cLENT.DeleteBucket(tkn.accountId, "bucket_id")
Await cLENT.DeleteFile("file_id", "mypic.jpg")
Await cLENT.FileMetadata("file_id")
Await cLENT.UpdateBucket(tkn.accountId, "bucket_id", BackBlazeSDK.Utilitiez.BucketTypesEnum.allPrivate)
Dim CancelToken As New Threading.CancellationTokenSource()
Dim _ReportCls As New Progress(Of BackBlazeSDK.ReportStatus)(Sub(r) Console.WriteLine($"{r.BytesTransferred}/{r.TotalBytes}" + r.ProgressPercentage + If(r.TextStatus, "Downloading...")))
Await cLENT.PrivateBucket_DownloadFile("file_id", "C:\Down", "mypic.jpg", _ReportCls, CancelToken.Token)
Await cLENT.Upload("C:\Down\mypic.jpg", BackBlazeSDK.Utilitiez.UploadTypes.FilePath, "bucket_id", "mypic.jpg", BackBlazeSDK.Utilitiez.SHA1FileHash(IO.File.ReadAllBytes("C:\Down\mypic.jpg")), _ReportCls, CancelToken.Token)
cLENT.PublicBucket_GetDirectUrl(tkn.downloadApiUrl, "My_Bucket", "mypic.jpg")

Features

  • [x] Assemblies for .NET 4.5.2 and .NET Standard 2.0 and .NET Core 2.1
  • [x] Just one external reference (Newtonsoft.Json)
  • [x] Easy installation using NuGet
  • [x] Upload/Download tracking support
  • [x] Proxy Support
  • [x] Upload/Download cancellation support
  • [ ] Support Upload/Download pause/resume

List of functions:

  • ListBuckets
  • List
  • Upload
  • FileMetadata
  • DeleteBucket
  • CreateBucket
  • CopyFile
  • DeleteFile
  • UpdateBucket
  • PublicBucket_DownloadFile
  • PublicBucket_DownloadFileAsStream
  • PrivateBucket_DownloadFile
  • PrivateBucket_DownloadFileAsStream
  • PublicBucket_GetDirectUrl

Code simple:

Dim tkn = Await BackBlazeSDK.Authentication.GetToken_24Hrs("key_id", "app_id")
Dim cLENT As BackBlazeSDK.IClient = New BackBlazeSDK.BClient(tkn.apiUrl, tkn.authorizationToken, New BackBlazeSDK.ConnectionSettings With {.CloseConnection = True, .TimeOut = TimeSpan.FromMinutes(80), .Proxy = New BackBlazeSDK.ProxyConfig With {.SetProxy = True, .ProxyIP = "127.0.0.1", .ProxyPort = 80, .ProxyUsername = "user", .ProxyPassword = "123456"}})

Await cLENT.ListBuckets(tkn.accountId)
Await cLENT.List("bucket_id")
Await cLENT.CopyFile("file_id", "bucket_id", "mypic.jpg")
Await cLENT.CreateBucket(tkn.accountId, "bucket_name", BackBlazeSDK.Utilitiez.BucketTypesEnum.allPublic)
Await cLENT.DeleteBucket(tkn.accountId, "bucket_id")
Await cLENT.DeleteFile("file_id", "mypic.jpg")
Await cLENT.FileMetadata("file_id")
Await cLENT.UpdateBucket(tkn.accountId, "bucket_id", BackBlazeSDK.Utilitiez.BucketTypesEnum.allPrivate)
Dim CancelToken As New Threading.CancellationTokenSource()
Dim _ReportCls As New Progress(Of BackBlazeSDK.ReportStatus)(Sub(r) Console.WriteLine($"{r.BytesTransferred}/{r.TotalBytes}" + r.ProgressPercentage + If(r.TextStatus, "Downloading...")))
Await cLENT.PrivateBucket_DownloadFile("file_id", "C:\Down", "mypic.jpg", _ReportCls, CancelToken.Token)
Await cLENT.Upload("C:\Down\mypic.jpg", BackBlazeSDK.Utilitiez.UploadTypes.FilePath, "bucket_id", "mypic.jpg", BackBlazeSDK.Utilitiez.SHA1FileHash(IO.File.ReadAllBytes("C:\Down\mypic.jpg")), _ReportCls, CancelToken.Token)
cLENT.PublicBucket_GetDirectUrl(tkn.downloadApiUrl, "My_Bucket", "mypic.jpg")

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.8.4 142 3/26/2020
1.8.3 215 1/22/2020
1.8.1 170 10/11/2019
1.7.0 150 10/9/2019
1.6.0 164 10/6/2019
1.5.0 195 9/21/2019
1.0.5 156 9/17/2019
1.0.4 169 9/10/2019
1.0.0 159 9/1/2019