Aelena.FileApi.Core 0.3.1

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

Aelena.FileApi.Core

Pure document processing for .NET — DOCX, images, email, hashing, PII detection, readability, text analysis and ZIP inspection.

No ASP.NET dependencies and no copyleft dependencies, so it works equally well in a console app, a desktop app, an Azure Function, or behind an HTTP or gRPC host. Every operation is a static method taking byte[] and returning an immutable record — no streams to manage, no IFormFile, no shared mutable state.

MIT licensed. Nothing in this package's dependency graph is copyleft.

📖 Full documentation, examples and the complete endpoint list are in the repository README.


Install

dotnet add package Aelena.FileApi.Core

Targets net10.0 and net11.0.

What it does

Area Operations
DOCX Metrics, metadata, paragraph extraction, Markdown conversion, search, health check, metadata removal
Images Resize, rotate, crop, convert (PNG/JPEG/WebP/BMP/GIF/TIFF), thumbnail, flip, blur, grayscale, compress, strip metadata, EXIF, auto-orient, invert, edge detect, equalize, colour palette, base64
Email .eml (RFC 5322 / MIME) parsing — headers, body, attachment metadata
Hashing SHA-256, MD5, SHA-1, and a composite hash that folds in filename and size
PII Emails, credit cards, IBANs, SSNs, phone numbers, national IDs (US, ES, FR, DE, IT, UK, PT), dates of birth
Text Word/char/token counts, language detection, literal and regex search with context
Readability Flesch Reading Ease, Flesch-Kincaid, Gunning Fog, SMOG
ZIP Entry listing with sizes, compression and CRC-32, without extracting
Persistence SQLite-backed share links; a bounded in-memory job store

Example

using Aelena.FileApi.Core.Services.Common;

var bytes = await File.ReadAllBytesAsync("contract.docx");

// Content fingerprints
var hashes = HashService.ComputeHash(bytes, "contract.docx");
Console.WriteLine(hashes.Sha256);

// Personal data, with position and surrounding context
var pii = PiiService.Detect(text, "contract.docx");
foreach (var match in pii.Matches)
    Console.WriteLine($"{match.PiiType}: {match.Value} at {match.Start}");

// Readability
var score = ReadabilityService.Analyse(text, "contract.docx", language: "en");
Console.WriteLine($"Flesch {score.FleschReadingEase:F1} — {score.Interpretation}");

Expected failures — an unsupported format, an out-of-range page, a malformed regex — throw FileApiException, which carries an HTTP status code and a message written for the caller rather than the maintainer. Caller-supplied regular expressions run with a match timeout.

PDF is a separate package, deliberately

PDF operations live in Aelena.FileApi.Core.Pdf, which is AGPL-3.0-or-later because it is built on iText 7.

That separation is the reason this package can be MIT: it has no reference to iText, direct or transitive. CI asserts it on every push by inspecting both the declared dependencies and the files inside the packed .nupkg, so the boundary cannot quietly erode. Add the PDF package only if you have read the AGPL and accept it, or hold a commercial iText licence.

The three packages

Package Licence Depends on Contains
Aelena.FileApi.Core MIT Everything except PDF
Aelena.FileApi.Core.Pdf AGPL-3.0-or-later Core, iText 7 PDF only
Aelena.FileApi.Cli AGPL-3.0-or-later bundled, not declared Both, as a dotnet tool
Aelena.FileApi.Core          MIT, no iText anywhere in its graph
        ▲
        │ depends on
        │
Aelena.FileApi.Core.Pdf      AGPL — adds iText 7, and only this package does

Core.Pdf depends on Core, never the reverse: installing the PDF package gives you the whole toolkit, while installing Core alone keeps every copyleft dependency out of your build. The CLI is a tool package, so it bundles its dependencies rather than declaring them — its empty dependency list does not mean iText is absent from it.

Note on ImageSharp

Imaging goes through SixLabors.ImageSharp, which is under the Six Labors Split License: free for open-source and for organisations below a revenue threshold, commercial licence above it. Not copyleft, but worth knowing where you stand.

More

Product 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aelena.FileApi.Core:

Package Downloads
Aelena.FileApi.Core.Pdf

PDF operations for Aelena.FileApi.Core, built on iText 7. IMPORTANT LICENSING NOTE: this package depends on iText 7, which is licensed under the AGPL. The AGPL is a strong copyleft licence: if you use this package in a network-facing application, that obligation extends to your application. Use iText's commercial licence if that is not acceptable. The rest of the toolkit — DOCX, images, email, hashing, PII, readability, text and ZIP — lives in Aelena.FileApi.Core, which is MIT and has no iText dependency.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.1 39 9/1/2026
0.3.0 42 9/1/2026