BarakoCMS.Files 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BarakoCMS.Files --version 0.2.0
                    
NuGet\Install-Package BarakoCMS.Files -Version 0.2.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="BarakoCMS.Files" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BarakoCMS.Files" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="BarakoCMS.Files" />
                    
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 BarakoCMS.Files --version 0.2.0
                    
#r "nuget: BarakoCMS.Files, 0.2.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 BarakoCMS.Files@0.2.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=BarakoCMS.Files&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=BarakoCMS.Files&version=0.2.0
                    
Install as a Cake Tool

<div align="center"> <h1>BarakoCMS.Files</h1> <p><em>Optional file-attachment module for barakoCMS.</em></p> </div>


Adds file upload + download to barakoCMS, storing bytes in Postgres via Marten. Handy for receipts, photos, and documents attached to your own records.

Enable it

builder.Services.AddBarakoCMS(builder.Configuration, modules =>
{
    modules.Add(new BarakoCMS.Files.FilesModule());
});

Endpoints

Method & path Purpose
POST /api/files Upload one image or PDF (≤ 10 MB, multipart). Returns { id, fileName, contentType, size }.
GET /api/files/{id} Stream the file back with its original content type. Requires a Bearer token.

Attach the returned id to your own documents; fetch it later with the download endpoint. Because GET requires authentication, browser <img>/<a> tags can't load it directly — fetch it with the token and use an object URL.

Notes

Files live in the stored_files Marten document (bytes in Postgres). This suits low-to-moderate volumes of small files; for large-scale blob storage, use an object store instead.

Requires

barakoCMS ≥ 2.2.0. Targets .NET 8.

License

MPL-2.0 © BaryoDev

If barakoCMS is useful to you, a star on the repository helps other people find it.

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 was computed.  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 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on BarakoCMS.Files:

Package Downloads
BarakoCMS.Files.S3

S3-compatible object storage provider for the barakoCMS Files module. Works with AWS S3, Cloudflare R2, and self-hosted S3-compatible stores such as SeaweedFS. Public files get a direct, CDN-friendly URL; private files are proxied through the API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.1.0 46 10/23/2026
5.0.0 97 10/14/2026
4.6.0 107 10/12/2026
4.5.0 89 10/11/2026
4.4.0 108 10/4/2026
4.3.1 104 9/29/2026
4.3.0 120 9/21/2026
4.2.1 106 9/18/2026
4.1.1 124 9/18/2026
4.0.0 123 9/7/2026
0.2.0 141 8/20/2026
0.1.3 146 8/15/2026
0.1.2 222 8/3/2026
0.1.1 162 7/21/2026
0.1.0 115 7/15/2026