GaEpd.FileService
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package GaEpd.FileService --version 1.0.0
NuGet\Install-Package GaEpd.FileService -Version 1.0.0
<PackageReference Include="GaEpd.FileService" Version="1.0.0" />
paket add GaEpd.FileService --version 1.0.0
#r "nuget: GaEpd.FileService, 1.0.0"
// Install GaEpd.FileService as a Cake Addin #addin nuget:?package=GaEpd.FileService&version=1.0.0 // Install GaEpd.FileService as a Cake Tool #tool nuget:?package=GaEpd.FileService&version=1.0.0
Georgia EPD-IT File Service Library
This library was created by Georgia EPD-IT to provide common file services for our web applications.
How to install
To install, search for "GaEpd.FileService" in the NuGet package manager or run the following command:
dotnet add package GaEpd.FileService
What's included
An IFileService
interface is provided to abstract out common file persistence operations along with three useful
implementations:
In Memory
builder.Services.AddSingleton<IFileService, InMemoryFileService>();
File System
The basePath
is required and defines where the files will be stored.
builder.Services.AddTransient<IFileService, FileSystemFileService>(_ =>
new FileSystemFileService(basePath));
If a Windows Identity is required to access the desired file system, include the username, domain, and password in the constructor.
builder.Services.AddTransient<IFileService, FileSystemFileService>(_ =>
new FileSystemFileService(basePath, userName, domain, password));
Azure Blob Storage
Requires an Azure account and an existing Blob Storage container. (The Azure Blob service does not attempt to create the
container if it does not exist.) The basePath
is optional and is added to file names as a path segment.
builder.Services.AddSingleton<IFileService, AzureBlobFileService>(_ =>
new AzureBlobFileService(accountName, container, basePath));
Warning: At the moment, the SaveFileAsync()
method throws an exception when using Azure Blob Storage if the file
already exists.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Azure.Identity (>= 1.10.3)
- Azure.Storage.Blobs (>= 12.18.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.0.0
- Initial release.