Indiko.Blocks.Storage.Local
6.0.2
dotnet add package Indiko.Blocks.Storage.Local --version 6.0.2
NuGet\Install-Package Indiko.Blocks.Storage.Local -Version 6.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="Indiko.Blocks.Storage.Local" Version="6.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Indiko.Blocks.Storage.Local" Version="6.0.2" />
<PackageReference Include="Indiko.Blocks.Storage.Local" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Indiko.Blocks.Storage.Local --version 6.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Indiko.Blocks.Storage.Local, 6.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.
#:package Indiko.Blocks.Storage.Local@6.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Indiko.Blocks.Storage.Local&version=6.0.2
#tool nuget:?package=Indiko.Blocks.Storage.Local&version=6.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Indiko.Blocks.Storage.Local
Local file-system implementation of IFileProvider.
Overview
This package stores files on disk and enforces storage constraints from local storage options.
Key Components
LocalStorageBlockLocalStorageFileProviderAddLocalStorage(...)extensionLocalStorageOptions
DI Registration Entry Points
LocalStorageBlock.ConfigureServices(...)services.AddLocalStorage(configuration, logger)
Configuration
LocalStorageOptions:
- inherited storage settings (
MaxFileSize,AllowedFileTypes) Folder
Runtime Behavior and Caveats
- Validates allowed file extensions and maximum file size. Extensions are compared
case-insensitively and independently of a leading dot, so
"pgm"in configuration matches a call passing".pgm". - A file name that would resolve outside
Folderis rejected withNotAllowedException. - Writes stream to disk; the size limit is checked up front for a seekable stream and enforced during the copy otherwise, with the partial file removed on failure.
ExistsAsyncreturnsfalsefor a missing file, andDeleteAsyncreturnsfalsewhen there was nothing to delete.OpenReadAsyncreturns aFileStream-- the caller owns and disposes it.GetPresignedUrlAsyncthrowsNotSupportedException: the file system has no equivalent.SaveFileAsync(string content)stores UTF-8 bytes of provided raw text. The cloud providers decode the same argument as Base64, so this overload is not portable -- prefer a stream overload.- Throws domain-specific exceptions such as:
ConfigurationExceptionNotFoundExceptionConflictExceptionNotAllowedExceptionLimitExceededException
Minimal Usage
var provider = serviceProvider.GetRequiredService<IFileProvider>();
var fileName = await provider.SaveFileAsync(".txt", "content", cancellationToken);
Target Framework
- .NET 10
Related Packages
Indiko.Blocks.Storage.Abstractions
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- CommunityToolkit.Diagnostics (>= 8.4.2)
- Indiko.Blocks.Storage.Abstractions (>= 6.0.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
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 |
|---|---|---|
| 6.0.2 | 233 | 10/23/2026 |
| 6.0.1 | 95 | 10/23/2026 |
| 6.0.0 | 107 | 10/22/2026 |
| 5.1.0 | 98 | 10/22/2026 |
| 5.0.0 | 105 | 10/21/2026 |
| 4.3.1 | 103 | 10/21/2026 |
| 4.3.0 | 99 | 10/20/2026 |
| 4.2.0 | 100 | 10/19/2026 |
| 4.1.0 | 99 | 10/15/2026 |
| 4.0.0 | 111 | 10/1/2026 |
| 3.0.1 | 226 | 9/30/2026 |
| 3.0.0 | 104 | 9/30/2026 |
| 2.9.1 | 348 | 8/20/2026 |
| 2.9.0 | 123 | 8/20/2026 |
| 2.8.0 | 418 | 5/22/2026 |
| 2.7.8 | 154 | 5/7/2026 |
| 2.7.7 | 121 | 5/7/2026 |
| 2.7.6 | 186 | 4/23/2026 |
| 2.7.5 | 203 | 4/23/2026 |
| 2.7.4 | 143 | 4/23/2026 |
Loading failed