![]() |
VOOZH | about |
dotnet add package Rystem.Content.Infrastructure.Storage.File --version 10.0.8
NuGet\Install-Package Rystem.Content.Infrastructure.Storage.File -Version 10.0.8
<PackageReference Include="Rystem.Content.Infrastructure.Storage.File" Version="10.0.8" />
<PackageVersion Include="Rystem.Content.Infrastructure.Storage.File" Version="10.0.8" />Directory.Packages.props
<PackageReference Include="Rystem.Content.Infrastructure.Storage.File" />Project file
paket add Rystem.Content.Infrastructure.Storage.File --version 10.0.8
#r "nuget: Rystem.Content.Infrastructure.Storage.File, 10.0.8"
#:package Rystem.Content.Infrastructure.Storage.File@10.0.8
#addin nuget:?package=Rystem.Content.Infrastructure.Storage.File&version=10.0.8Install as a Cake Addin
#tool nuget:?package=Rystem.Content.Infrastructure.Storage.File&version=10.0.8Install as a Cake Tool
This provider adds Azure File Share support to the Content framework.
Repo note: the folder name is Rystem.Content.Infrastructure.Azure.Storage.File, but the current NuGet package id is Rystem.Content.Infrastructure.Storage.File.
dotnet add package Rystem.Content.Infrastructure.Storage.File
The provider is a thin wrapper over ShareClient and ShareFileClient.
Prefix is configured, registration also creates the prefix directoriesThe public registration extensions live in BuilderExtensions/ContentRepositoryBuilderExtensions.cs, while the runtime behavior is in FileStorage/FileStorageRepository.cs.
| Method | Default lifetime | Notes |
|---|---|---|
WithFileStorageIntegrationAsync(options, name, serviceLifetime) |
Transient |
preferred path because setup is async |
WithFileStorageIntegration(options, name, serviceLifetime) |
Transient |
sync wrapper over the async implementation |
This matches the unit-test startup in src/Content/Rystem.Content.Tests/Rystem.Content.UnitTest/Startup.cs.
var repositories = builder.Services.AddContentRepository();
await repositories.WithFileStorageIntegrationAsync(options =>
{
options.ShareName = "supertest";
options.Prefix = "site/";
options.ConnectionString = builder.Configuration["ConnectionString:Storage"];
}, "filestorage");
Resolve and use it:
public sealed class FileShareDocumentService
{
private readonly IContentRepository _repository;
public FileShareDocumentService(IFactory<IContentRepository> factory)
=> _repository = factory.Create("filestorage");
public ValueTask<bool> SaveAsync(string path, byte[] data)
=> _repository.UploadAsync(path, data, new ContentRepositoryOptions
{
HttpHeaders = new ContentRepositoryHttpHeaders
{
ContentType = "application/pdf"
},
Metadata = new Dictionary<string, string>
{
["department"] = "legal"
}
});
}
FileStorageConnectionSettings exposes:
| Property | Notes |
|---|---|
ConnectionString |
used when present |
EndpointUri |
used for managed identity mode |
ManagedIdentityClientId |
null means DefaultAzureCredential; otherwise ManagedIdentityCredential |
ShareName |
used in connection-string mode |
Prefix |
prepended to every logical path and pre-created as directories |
ClientOptions |
passed to ShareClient |
ClientCreateOptions |
used when creating the share |
Permissions |
passed to SetAccessPolicyAsync(...) |
Conditions |
passed to SetAccessPolicyAsync(...) |
IsPublic |
present on the settings type, but not used by the current implementation |
In managed identity mode, the provider constructs the client as:
new ShareClient(settings.EndpointUri, credential, settings.ClientOptions)
So EndpointUri needs to point to the share itself. In that path, ShareName is ignored.
UploadAsync creates intermediate directories if they do not existSetPropertiesAsync maps HTTP headers and metadataGetPropertiesAsync reads headers and metadataTags are not supported and stay nullCompared with Blob Storage, this provider is more directory-oriented and less metadata-rich.
ListAsync(...) enumerates a single directory scope and skips directory entries. It does not recursively walk nested folders the way the SharePoint provider does.
overwrite is effectively ignoredIf the file already exists, UploadAsync(...) resizes it and uploads the new bytes regardless of the overwrite parameter.
If you need strict create-only behavior, check ExistAsync(...) first.
The current implementation returns different shapes depending on the method:
DownloadAsync returns Path = path and Uri = pathGetPropertiesAsync returns Path = fileClient.NameListAsync returns Uri = fileClient.Uri.ToString() and a relative pathSo treat Path and Uri as provider-defined output rather than a normalized contract.
Use it when you want:
It is less appropriate when you need native tag support or Blob-like path semantics.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.8 | 5,499 | 5/13/2026 |
| 10.0.7 | 135 | 3/26/2026 |
| 10.0.6 | 433,485 | 3/3/2026 |
| 10.0.5 | 125 | 2/22/2026 |
| 10.0.4 | 138 | 2/9/2026 |
| 10.0.3 | 147,892 | 1/28/2026 |
| 10.0.1 | 209,123 | 11/12/2025 |
| 9.1.3 | 265 | 9/2/2025 |
| 9.1.2 | 764,467 | 5/29/2025 |
| 9.1.1 | 97,827 | 5/2/2025 |
| 9.0.32 | 186,707 | 4/15/2025 |
| 9.0.31 | 5,815 | 4/2/2025 |
| 9.0.30 | 88,877 | 3/26/2025 |
| 9.0.29 | 9,042 | 3/18/2025 |
| 9.0.28 | 267 | 3/17/2025 |
| 9.0.27 | 286 | 3/16/2025 |
| 9.0.26 | 275 | 3/13/2025 |
| 9.0.25 | 52,146 | 3/9/2025 |
| 9.0.21 | 337 | 3/6/2025 |
| 9.0.20 | 19,626 | 3/6/2025 |