WopiHost.FileSystemProvider 8.0.0

dotnet add package WopiHost.FileSystemProvider --version 8.0.0
                    
NuGet\Install-Package WopiHost.FileSystemProvider -Version 8.0.0
                    
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="WopiHost.FileSystemProvider" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WopiHost.FileSystemProvider" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WopiHost.FileSystemProvider" />
                    
Project file
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 WopiHost.FileSystemProvider --version 8.0.0
                    
#r "nuget: WopiHost.FileSystemProvider, 8.0.0"
                    
#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 WopiHost.FileSystemProvider@8.0.0
                    
#: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=WopiHost.FileSystemProvider&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=WopiHost.FileSystemProvider&version=8.0.0
                    
Install as a Cake Tool

WopiHost.FileSystemProvider

NuGet NuGet

Reference implementation of IWopiStorageProvider and IWopiWritableStorageProvider backed by a local directory tree. Identifiers are short opaque strings cached in-memory and mapped to absolute paths.

Suitable for development, validator runs, and single-instance deployments. Storage only — token issuance and ACLs live in WopiHost.Core.

Install

dotnet add package WopiHost.FileSystemProvider

Configure

// appsettings.json
"Wopi": {
  "StorageProvider": {
    "RootPath": "./wopi-docs"   // absolute or relative to ContentRootPath
  }
}

RootPath is bound from the Wopi:StorageProvider section (WopiFileSystemProviderOptions.SectionName).

Register

builder.Services.AddFileSystemStorageProvider(builder.Configuration);
builder.Services.AddWopi(o =>
{
    o.ClientUrl = new Uri("https://your-office-online-server.com");
});

AddFileSystemStorageProvider registers WopiFileSystemProvider as both IWopiStorageProvider and IWopiWritableStorageProvider (one shared instance per scope) plus the singleton InMemoryFileIds map the provider uses for path↔id round-tripping. The runnable sample drives all of this through a sample-local Sample:StorageProvider discriminator — see sample/WopiHost/Program.cs.

How identifiers work

Identifiers are short tokens generated by InMemoryFileIds on first scan and reused for the lifetime of the process. They are NOT base64-encoded paths; consumers should treat them as opaque strings. Lookup is O(1) in both directions; the cache is rebuilt at startup if RootPath changes.

A consequence of this design: identifiers are stable within a process but not across restarts. Persist your own mapping if you need long-lived URLs.

Customize

To layer behavior — versioning, audit, soft-delete — wrap the provider via composition. The concrete class' interface methods are non-virtual, so a decorator is the cleanest seam:

public class AuditingStorageProvider(IWopiWritableStorageProvider inner, IAuditLog audit)
    : IWopiWritableStorageProvider
{
    public async Task<bool> DeleteWopiFile(string id, CancellationToken ct = default)
    {
        var deleted = await inner.DeleteWopiFile(id, ct);
        if (deleted) audit.Log($"deleted file {id}");
        return deleted;
    }

    public async Task<bool> DeleteWopiContainer(string id, CancellationToken ct = default)
    {
        var deleted = await inner.DeleteWopiContainer(id, ct);
        if (deleted) audit.Log($"deleted container {id}");
        return deleted;
    }

    // Forward the rest of IWopiWritableStorageProvider to `inner`.
    public int FileNameMaxLength => inner.FileNameMaxLength;
    // ...
}

License

See the repo README.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.

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
8.0.0 197 5/14/2026
7.0.0 248 5/6/2026
6.0.0 143 5/3/2026
5.1.0 93 4/30/2026
5.0.5 114 3/1/2026
5.0.3 96 3/1/2026
5.0.2 108 3/1/2026
4.0.1 349 2/24/2024
3.0.0 397 11/13/2021
3.0.0-beta1 437 3/21/2021