Skip to content

Commit 10b6629

Browse files
authored
doc(CardUpload): update documation (#4373)
* doc: 更新示例上传文件限制更改为 5M * feat: 增加 AutoResetWhenInvalid 参数 * doc: 代码格式化 * Revert "feat: 增加 AutoResetWhenInvalid 参数" This reverts commit 8798549. * chore: bump version 8.10.1
1 parent 5c629bb commit 10b6629

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

src/BootstrapBlazor.Server/Components/Samples/Uploads.razor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public sealed partial class Uploads
2121

2222
private CancellationTokenSource? ReadToken { get; set; }
2323

24-
private static long MaxFileLength => 200 * 1024 * 1024;
24+
private static long MaxFileLength => 5 * 1024 * 1024;
2525

2626
private Person Foo1 { get; set; } = new Person();
2727

@@ -184,7 +184,7 @@ private async Task OnCardUpload(UploadFile file)
184184
{
185185
if (file != null && file.File != null)
186186
{
187-
// 服务器端验证当文件大于 2MB 时提示文件太大信息
187+
// 服务器端验证当文件大于 5MB 时提示文件太大信息
188188
if (file.Size > MaxFileLength)
189189
{
190190
await ToastService.Information(Localizer["UploadsFileMsg"], Localizer["UploadsFileError"]);

src/BootstrapBlazor.Server/Locales/en-US.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,7 @@
33873387
"UploadPreCardStyleWasm": "<b>Wasm mode </b>",
33883388
"UploadPreCardStyleWasmSide": "It wasn't available in <code>wasm</code> mode, <code>IWebHostEnvironment</code> needed to save files to the server side by calling <code>webapi</code> interface, and so on",
33893389
"UploadPreCardStyleLink": "Interested students can view their knowledge of <code>Upload</code> components through the <code>wiki</code> in the open source repository related resources of the <a href='{0}' target='_blank'>[The portal]</a>",
3390-
"UploadPreCardStyleValidation": "In this example, server-side verification prompts the file for too much prompt when the file size exceeds <code>200MB</code>",
3390+
"UploadPreCardStyleValidation": "In this example, server-side verification prompts the file for too much prompt when the file size exceeds <code>5MB</code>",
33913391
"UploadPreCardStyleTips1": "In this example, the <code>ShowProgress=true</code> display upload progress bar",
33923392
"UploadPreCardStyleTips2": "When you set up <code>IsSingle</code>, you can upload only one image or file",
33933393
"UploadFileIconTitle": "The file icon",
@@ -3425,7 +3425,7 @@
34253425
"UploadsFormatError": "The file format is incorrect",
34263426
"UploadsAvatarMsg": "Avatar upload",
34273427
"UploadsFileMsg": "Upload the file",
3428-
"UploadsFileError": "The file size is greater than 200MB",
3428+
"UploadsFileError": "The file size is greater than 5MB",
34293429
"UploadsSaveFileError": "Failed to save the file",
34303430
"UploadFile": "Upload the file",
34313431
"UploadsWasmError": "Wasm mode does not implement saving code",

src/BootstrapBlazor.Server/Locales/zh-CN.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,7 @@
33873387
"UploadPreCardStyleWasm": "<b>Wasm 模式</b>",
33883388
"UploadPreCardStyleWasmSide": "<code>wasm</code> 模式中无法使用 <code>IWebHostEnvironment</code> 需要调用 <code>webapi</code> 接口等形式将文件保存到服务器端",
33893389
"UploadPreCardStyleLink": "有兴趣的同学可以通过开源仓库中的 <code>wiki</code> 文档中相关资源查看关于 <code>Upload</code> 组件的相关知识技巧 <a href='{0}' target='_blank'>[传送门]</a>",
3390-
"UploadPreCardStyleValidation": "本例中通过服务器端验证当文件大小超过 <code>200MB</code> 时,提示文件太大提示信息",
3390+
"UploadPreCardStyleValidation": "本例中通过服务器端验证当文件大小超过 <code>5MB</code> 时,提示文件太大提示信息",
33913391
"UploadPreCardStyleTips1": "本例中设置 <code>ShowProgress=true</code> 显示上传进度条",
33923392
"UploadPreCardStyleTips2": "设置 <code>IsSingle</code> 时,仅可以上传一张图片或者文件",
33933393
"UploadFileIconTitle": "文件图标",
@@ -3425,7 +3425,7 @@
34253425
"UploadsFormatError": "文件格式不正确",
34263426
"UploadsAvatarMsg": "头像上传",
34273427
"UploadsFileMsg": "上传文件",
3428-
"UploadsFileError": "文件大小超过 200MB",
3428+
"UploadsFileError": "文件大小超过 5MB",
34293429
"UploadsSaveFileError": "保存文件失败",
34303430
"UploadFile": "上传文件",
34313431
"UploadsWasmError": "Wasm 模式未实现保存代码",

src/BootstrapBlazor/BootstrapBlazor.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>8.9.4</Version>
4+
<Version>8.10.1</Version>
55
</PropertyGroup>
66

77
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">

src/BootstrapBlazor/Components/Upload/ButtonUploadBase.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ protected override async Task OnFileChange(InputFileChangeEventArgs args)
214214
}
215215
file.Uploaded = true;
216216
}
217-
//触发ValueChange,以支持bing-value
217+
218+
//触发 ValueChange,以支持 bind-value
218219
await base.OnFileChange(args);
219220
}
220221

src/BootstrapBlazor/Components/Upload/UploadBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected virtual async Task<bool> OnFileDelete(UploadFile item)
102102
}
103103

104104
/// <summary>
105-
///
105+
/// 上传文件改变时回调此方法
106106
/// </summary>
107107
/// <param name="args"></param>
108108
/// <returns></returns>

0 commit comments

Comments
 (0)