MicroCloud.File
8.0.0.5
dotnet add package MicroCloud.File --version 8.0.0.5
NuGet\Install-Package MicroCloud.File -Version 8.0.0.5
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="MicroCloud.File" Version="8.0.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroCloud.File --version 8.0.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroCloud.File, 8.0.0.5"
#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.
// Install MicroCloud.File as a Cake Addin #addin nuget:?package=MicroCloud.File&version=8.0.0.5 // Install MicroCloud.File as a Cake Tool #tool nuget:?package=MicroCloud.File&version=8.0.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MicroCloud 文件组件
说明
MicroCloud 文件组件,封装基于Web的文件资源管理服务,支持数据库、物理存储、数据存储服务三种存储方式,物理存储模式下支持静态资源URL映射。
用法
可按照如下配置方式使用:
- 通过nuget引用
MicroCloud.File
程序集
Install-Package MicroCloud.File
- 在
appsettings.json
中 的MicroCloud
节点下添加如下配置节点
{
//静态资源配置
"File": {
"Root": ".\\StaticFiles", //资源实际存放的磁盘根路径。例如:D:\\StaticFiles 或 .\\StaticFiles
"RequestPath": "/files", //映射到静态资源的相对请求路径。例如:/files
"AllowOrigin": true, //是否允许跨域
"VersionEnabled": true, //是否启用版本管理(启用后删除、修改前的文件将作为历史版本归档)
"StoreMode": "Physical", //存储方式:Database-数据库、Physical-物理存储、DataStoreSvc-数据存储服务
"StoreSvcConnectionString": "", //数据存储服务连接字符串:例如:Azure Blob Storage {"DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=yyy"}
"StoreGroup": "ByYearMonth", //存储分组:NoGroup-不分组、ByYear-按年度分组、ByYearMonth-按年度月度分组、ByYearMonthDay-按年月日分组、ByExts-按扩展类型分组
"FileSizeLimit": 1073741824, //文件大小限制:0为不限制
"PermittedExts": ".txt,.png,.docx", //允许的上传类型:*为允许所有,多类型用“,”分隔
"DisallowedExts": "exe,bat" //阻止的上传类型:*为不限制,多类型用“,”分隔
},
}
3.解决文件上传大小限制,在项目中添加web.config文件
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
交流
QQ群号:863605868 | 微信号:SeonHu |
Product | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- MicroCloud.AspNetCore (>= 8.0.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MicroCloud.File:
Package | Downloads |
---|---|
MicroCloud.Pack.File
MicroCloud 文件模块,封装基于 MicroCloud 文件组件的功能实现。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.0.5 | 131 | 4/19/2024 |
8.0.0.4 | 127 | 4/18/2024 |
8.0.0.3 | 150 | 4/15/2024 |
8.0.0.2 | 148 | 4/12/2024 |
8.0.0.1 | 156 | 4/12/2024 |
7.2.0.8 | 149 | 4/12/2024 |
7.2.0.7 | 144 | 4/12/2024 |
7.2.0.6 | 164 | 4/12/2024 |
7.2.0.5 | 148 | 4/12/2024 |
7.2.0.4 | 141 | 4/11/2024 |
7.0.0.9 | 252 | 4/18/2023 |
7.0.0.8 | 248 | 4/17/2023 |
7.0.0.7 | 237 | 4/12/2023 |
7.0.0.6 | 244 | 4/8/2023 |
7.0.0.5 | 238 | 4/7/2023 |
7.0.0.4 | 255 | 4/7/2023 |
7.0.0.3 | 256 | 4/7/2023 |