BarakoCMS.Import 4.0.0

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

<div align="center"> <img src="https://raw.githubusercontent.com/BaryoDev/barakoCMS/master/assets/icon.png" width="96" height="96" alt="BarakoCMS.Import logo" /> <h1>BarakoCMS.Import</h1> <p><em>Optional bulk-import module for barakoCMS — .xlsx & CSV into content.</em></p> </div>


A drop-in module for barakoCMS that turns spreadsheet uploads into content. It parses .xlsx/CSV with the zero-dependency Talaan reader, then bulk-creates content items through the CMS's own validation, permissions, and event-sourcing.

Enable it

dotnet add package BarakoCMS.Import
builder.Services.AddBarakoCMS(builder.Configuration);

var app = builder.Build();
app.UseBarakoCMS();

The package reference plus a restart is the install. AddBarakoCMS finds every module in the application's dependency context, and BarakoCMS:Modules:Enabled decides which of them run (BarakoCMS__Modules__Enabled=Import). Unset, every referenced module runs and the API logs one warning saying so. To name it by hand instead, put modules.Add(new BarakoCMS.Import.ImportModule()) in the AddBarakoCMS callback; discovery skips a type the host already added. See MODULES.md in the repository.

No services or schema to configure — the module only contributes endpoints.

The two-step flow

  1. Analyze — POST /api/import/analyze (multipart file upload). Returns a typed preview grid (rows × columns, each cell tagged Text/Number/Date/Boolean) plus a suggested header row. Nothing is stored. A UI uses this to let the user map columns to content fields.

  2. Create — POST /api/import/content (JSON):

    {
      "contentType": "member",
      "records": [
        { "FirstName": "Dindo", "LastName": "Abantao", "MemberNo": "3322657" }
      ],
      "continueOnError": false
    }
    

    Every record is validated against the content type first. With continueOnError: false (default), a single invalid row aborts the whole import and returns per-row errors — nothing is written. Otherwise valid rows are created and failures reported. All creates commit in one transaction.

Why split analyze from create

The mapping and any cleanup (skipping title/section rows, formatting numbers, choosing which columns matter) happen in your UI between the two calls. The module stays generic: it parses, and it creates validated content — it does not hard-code any particular spreadsheet's shape.

Authorization

analyze requires an authenticated user. content is gated by the target content type's own create permission (via the CMS permission resolver) — so a role that can create member content can import members, and nothing else.

Requires

barakoCMS ≥ 4.0.0 and Talaan. Targets .NET 10.

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 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
4.7.1 45 10/25/2026
4.7.0 47 10/23/2026
4.5.0 85 10/14/2026
4.4.3 95 10/12/2026
4.4.2 90 10/11/2026
4.4.1 99 10/4/2026
4.4.0 101 9/29/2026
4.3.0 110 9/21/2026
4.1.1 111 9/18/2026
4.0.1 109 9/12/2026
4.0.0 120 9/7/2026
0.1.5 131 8/20/2026
0.1.3 131 8/15/2026
0.1.2 203 8/3/2026
0.1.1 141 7/21/2026
0.1.0 114 7/15/2026