FileHub.Core
1.0.0-beta.1
See the version list below for details.
dotnet add package FileHub.Core --version 1.0.0-beta.1
NuGet\Install-Package FileHub.Core -Version 1.0.0-beta.1
<PackageReference Include="FileHub.Core" Version="1.0.0-beta.1" />
<PackageVersion Include="FileHub.Core" Version="1.0.0-beta.1" />
<PackageReference Include="FileHub.Core" />
paket add FileHub.Core --version 1.0.0-beta.1
#r "nuget: FileHub.Core, 1.0.0-beta.1"
#:package FileHub.Core@1.0.0-beta.1
#addin nuget:?package=FileHub.Core&version=1.0.0-beta.1&prerelease
#tool nuget:?package=FileHub.Core&version=1.0.0-beta.1&prerelease
FileHub.Core
Sandboxed file-manager building blocks for ASP.NET Core: a pluggable storage abstraction, path/traversal security, chunked upload session management, image thumbnail generation, and Office-document-to-PDF conversion.
This package is the reusable engine behind FileHub.WebDemo, a full working ASP.NET Core MVC file manager built on top of it — that project is the best reference for wiring these pieces into your own app.
Install
dotnet add package FileHub.Core
Requires an ASP.NET Core host — the package references
Microsoft.AspNetCore.App (used for MIME-type detection).
What's in the box
Abstractions/—IFileSystemProvider,FileSystemItem: the storage abstraction. Implement this interface for a different backend (Azure Blob, S3, ...);PhysicalFileSystemProvideris the built-in local-disk implementation.Security/—PathValidator(traversal / absolute-path / symlink-escape protection) andFilenameSanitizer. Every provider operation should resolve throughPathValidatorbefore touching disk.Roots/—RootFolder,RootFolderOptions,RootFolderProvider: binds configuration into runtime root definitions (name, physical path, permissions, upload limits, extension allow/deny lists).Permissions/—PermissionFlags(browse/upload/download/create/rename/ move/copy/delete).Uploads/—UploadSessionManager: chunk staging + assembly for large uploads.Thumbnails/—ThumbnailService: SkiaSharp-based image thumbnails, disk-cached, keyed by root + path + last-modified.Conversion/—IOfficeConversionService/LibreOfficeConversionService: shells out tosoffice --headless --convert-to pdf, disk-cached, per-cache-key locking. Requires LibreOffice installed on the host machine (configure its path viaLibreOfficeOptions.ExecutablePath).Preview/—PreviewFileClassifier: which extensions need office conversion vs. streaming as-is.
Quick start
using FileHub.Core.Conversion;
using FileHub.Core.Roots;
using FileHub.Core.Thumbnails;
using FileHub.Core.Uploads;
using Microsoft.Extensions.Options;
builder.Services.Configure<RootFolderOptions>(
builder.Configuration.GetSection(RootFolderOptions.SectionName));
builder.Services.AddSingleton<IRootFolderProvider, RootFolderProvider>();
builder.Services.AddSingleton(new UploadSessionManager(
Path.Combine(builder.Environment.ContentRootPath, "App_Data", ".uploads")));
builder.Services.AddSingleton(new ThumbnailService(
Path.Combine(builder.Environment.ContentRootPath, "App_Data", ".cache", "thumbnails")));
builder.Services.Configure<LibreOfficeOptions>(
builder.Configuration.GetSection(LibreOfficeOptions.SectionName));
builder.Services.AddSingleton<IOfficeConversionService>(sp =>
new LibreOfficeConversionService(
Path.Combine(builder.Environment.ContentRootPath, "App_Data", ".cache", "office-pdf"),
sp.GetRequiredService<IOptions<LibreOfficeOptions>>()));
Then bind root folders under a FileHub:Roots configuration section — see
the FileHub.WebDemo sample
for a complete controller wiring these services into browse/upload/
download/preview endpoints.
License
MIT — see LICENSE.
| 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. |
-
net10.0
- SkiaSharp (>= 4.150.1)
- SkiaSharp.NativeAssets.Linux (>= 4.150.1)
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.1 | 99 | 8/30/2026 |
| 1.0.0 | 98 | 8/30/2026 |
| 1.0.0-beta.2 | 63 | 8/26/2026 |
| 1.0.0-beta.1 | 85 | 8/25/2026 |