Senparc.Xncf.FileManager 0.7.2

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

Senparc.Xncf.FileManager

Senparc.Xncf.FileManager is an NCF module for bounded local file storage that serves two isolated purposes: safe source documents for KnowledgeBase and publishable static assets for the site.

Features

  • Separates KnowledgeBase and SiteAsset records and folders. A file cannot be changed from one purpose to the other in the management UI.
  • Stores new physical files below App_Data/NcfFiles/knowledge-base/yyyy/MM or App_Data/NcfFiles/site-assets/yyyy/MM with generated storage names and validated relative-path metadata. Legacy yyyy/MM knowledge-base paths remain readable.
  • Limits uploads to 50 MB per file, 20 files and 100 MB per request, with a purpose-specific extension allowlist.
  • Computes SHA-256 while writing each new file and persists its MIME type and content hash.
  • Keeps static assets private by default. Only a published SiteAsset is available anonymously at /assets/{id}/{fingerprint}; the endpoint resolves metadata rather than accepting a file-system path, sends nosniff, supports ranges, and uses immutable caching only for a matching fingerprint.
  • Cleans up the physical file when metadata persistence fails and stages deletion so a database failure can restore the file.
  • Prevents deletion of non-empty folders and rejects missing parents, duplicate sibling names, and path-like folder names.
  • Returns the original filename for downloads and exposes GetExtractedTextAsync only for KnowledgeBase sources.
  • Safely decodes UTF-8/UTF-16 text and parses DOCX, PPTX, and XLSX XML with DTDs disabled and decompressed-entry limits.
  • Protects file listing and deletion application-service APIs with the NCF AdminOnly policy.

Installation

<PackageReference Include="Senparc.Xncf.FileManager" Version="0.4.0-preview4" />

Key API

  • Register activates the module.
  • NcfFolderService creates, validates, queries, updates, and safely deletes folder records.
  • NcfFileService manages bounded physical storage, resource-purpose/visibility transitions, content metadata, and public asset URLs.
  • FileAssetController serves explicitly published site assets through /assets/{id}/{fingerprint}.
  • NcfFileTextExtractor provides dependency-free extraction for .txt, .log, .md, .markdown, .csv, .tsv, .json, .xml, .yaml, .yml, .html, .htm, .css, .js, .ts, .cs, .sql, .docx, .pptx, and .xlsx.
  • FileTemplateAppService and FileTemplate_GetListResponse expose template listing.
  • CreateFolderRequest, FileUploadModel, and DeleteFileRequest model common operations.

Current boundaries

  • KnowledgeBase uploads are intentionally limited to formats the module can extract safely: text, structured/code text, .docx, .xlsx, and .pptx. PDF, legacy Office, images, OCR, archives, and audio require a separately sandboxed parser.
  • Static-asset uploads accept images, audio/video, and fonts. HTML, SVG, JavaScript, and archives are deliberately excluded from the same-origin public-asset endpoint.
  • The module does not perform antivirus/content-disarm scanning or object-storage replication. Production hosts should scan uploads before exposing them to other users.
  • KnowledgeBase ingestion is snapshot-based; FileManager does not depend on or cascade-delete data in higher-level modules.
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 (2)

Showing the top 2 NuGet packages that depend on Senparc.Xncf.FileManager:

Package Downloads
Senparc.Xncf.KnowledgeBase

AI Knowledge Base

Senparc.Xncf.NeuChar

NeuChar AI conversation module for NCF administration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.1 0 12/1/2026
0.8.5.1 99 11/25/2026
0.8.5 115 11/19/2026
0.8.4 120 11/11/2026
0.8.3 114 11/5/2026
0.8.2 130 11/2/2026
0.7.3 144 10/4/2026
0.7.2 142 9/18/2026
0.7.1 127 9/16/2026
0.7.0 132 9/15/2026
0.6.3 154 8/29/2026
0.6.2 268 8/23/2026
0.6.1-preview2 147 8/14/2026
0.6.0-preview1 149 8/12/2026
0.5.1-preview6 145 8/8/2026
0.5.0-preview5 148 8/3/2026
0.4.0-preview4 128 7/31/2026
0.3.1-preview3 102 7/28/2026
0.3.0-preview2 97 7/26/2026
0.2.1-preview1 115 6/17/2026
Loading failed

v0.1.0 创世
     v0.1.3.4 修复文件上传问题
     [2025-06-20] v0.1.5-preview Add MCP functions in XncfRegisterBase class
     [2025-07-27] v0.1.6-preview.1 update Knowledge Base
     [2025-11-01] update basic libraries, including Senparc.AI
     [2026-01-07] v0.1.9-preview.1 Reset all database migrations
     [2026-04-24] Simplify FunctionRender request parameters and keep SelectionList UI metadata compatibility
     [2026-07-17] v0.3.0-preview2 为 FileManager 模块接入统一资源本地化并优化功能文案
     1、接入统一资源本地化机制,支持模块功能文案按当前文化动态显示
     2、更新 FunctionRender 与请求模型文案的资源化解析
     3、统一模块注册信息、菜单名称与功能描述的本地化输出
     4、同步管理页面与前端交互文案的多语言显示
     5、调整文件管理页链接导航处理,兼容桌面内嵌 WebView
     [2026-07-29] v0.3.1-preview3 加强文件上传校验和物理路径安全
     1、增加防伪校验、文件数量/大小/扩展名限制并规范原始文件名
     2、通过规范化路径阻止文件读取、删除和下载越界
     [2026-07-31] v0.4.0-preview4 扩展 FileManager 管理界面的多语言能力
     1、新增文件管理资源与前端本地化脚本
     2、升级 Senparc.CO2NET.WebApi 至 2.1.9-preview
     [2026-08-04] v0.5.0-preview5 新增文件文本提取与文件管理服务
     1、新增 NcfFileTextExtractor 以支持文件内容提取
     2、优化文件、目录及模板应用服务的处理流程
     [2026-08-08] v0.5.1-preview6 Dependency updates from upstream projects
     1、Dependency update from Senparc.Ncf.AreaBase to 0.23.2-preview6
     2、Dependency update from Senparc.Ncf.DatabasePlant to 0.21.6-preview6
     3、Dependency update from Senparc.Ncf.Service to 0.23.6-preview6
     4、Dependency update from Senparc.Xncf.AreasBase to 0.13.4-preview6
     [2026-08-13] v0.6.0-preview1 重构文件资源边界
     1、区分知识库源文件和站点静态资源,按用途隔离文件夹、列表与知识库摄取
     2、站点资源默认私有,显式发布后提供带 SHA-256 指纹的公开 URL 和长期缓存
     3、补齐 MIME、完整性指纹、流式下载、目录编辑删除与静态资源发布管理
     4、同步当前窗口中的资源边界模型、服务与管理页兼容性调整
     [2026-08-15] v0.6.1-preview2 Dependency update from Senparc.Ncf.DatabasePlant to 0.21.8-preview8; Senparc.Ncf.Service to 0.23.8-preview8
     [2026-08-22] v0.6.2-preview3 修复文件管理脚本缓存刷新
     1、为文件管理页面脚本引用补充版本参数,确保部署后加载最新资源
     [2026-08-29] v0.6.3 Dependency updates from Senparc.Ncf.DatabasePlant to 0.21.10; Dependency update from Senparc.Ncf.Service to 0.23.9-preview9
     1、Dependency update from Senparc.Ncf.DatabasePlant to 0.21.10
     2、Dependency update from Senparc.Ncf.Service to 0.23.9-preview9
     [2026-09-15] v0.7.0 优化文件管理、标签与回收站交互
     1、优化文件列表、数据面板、快速访问和树形标签管理布局
     2、完善文件上传、模板、批量操作与回收站清理的前后端处理
     3、优化文件资源在线预览控制器与安全发布访问路径
     [2026-09-16] v0.7.1 Dependency updates from Senparc.Xncf.KnowledgeBase to 0.7.3; Senparc.Web to 0.39.1
     [2026-09-17] v0.7.2 Dependency updates from Senparc.Ncf.XncfBase to 0.28.0
     1、同步受影响的基础库、AI 模块或宿主项目版本
     2、保持项目引用链与当前功能兼容