BlobStorage.Net 1.0.2

dotnet add package BlobStorage.Net --version 1.0.2                
NuGet\Install-Package BlobStorage.Net -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlobStorage.Net" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlobStorage.Net --version 1.0.2                
#r "nuget: BlobStorage.Net, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlobStorage.Net as a Cake Addin
#addin nuget:?package=BlobStorage.Net&version=1.0.2

// Install BlobStorage.Net as a Cake Tool
#tool nuget:?package=BlobStorage.Net&version=1.0.2                

BlobStorage.NET

How to setup this library to project.

IServiceCollection Services = ....;

Services.AddDiskStorage(
	Identifier: null, 
	Directory: new DirectoryInfo("path/to/store"),
	HttpBase: Access Base URL to map)
	;

// `null` identifier == "default".
// if no HttpBase specified, it can not make outer access url.

How to get storage by identifier.

IServiceProvider Services = ....;

// --> use `GetStorage` or `GetRequiredStorage`.
var Storage = Services.GetStorage(null);

How to store blob to storage.

using var DataStream = File.OpenRead(...);
await Storage.CreateDirectoryAsync("full/path");

if (await Storage.WriteAsync("full/path/name", DataStream) == true)
{
	var Uri = await Storage.MakeUriStringAsync("full/path/name");

	// --> base URI.
}

How to delete blob from storage.

await Storage.DeleteAsync("full/path/name");
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 849 1/28/2023
1.0.1 495 7/25/2021
1.0.0 408 7/19/2021