From 794cd919b30a80f40c28ac54218be19f62ac4094 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 19 Aug 2025 16:30:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20=E7=B2=BE=E7=AE=80=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Editor/Editor.razor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js index 3805cf48..a9223e64 100644 --- a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js +++ b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.js @@ -51,8 +51,7 @@ export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginI editor.files = files for (let i = 0; i < files.length; i++) { const file = files[i]; - const buffer = await file.arrayBuffer(); - const stream = DotNet.createJSStreamReference(buffer); + const stream = DotNet.createJSStreamReference(file); const url = await editor.invoker.invokeMethodAsync('ImageUpload', file.name, file.type || 'application/octet-stream', From 6cc95b5ce396dc8326835d86b721c2b16a70e26f Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 19 Aug 2025 16:31:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=BA=E5=8F=AF=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Editor/Editor.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs index b8691a94..8839c343 100644 --- a/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs +++ b/src/components/BootstrapBlazor.SummerNote/Components/Editor/Editor.razor.cs @@ -270,7 +270,7 @@ public async Task ClickPluginItem(string pluginItemName) /// /// [JSInvokable] - public async Task ImageUpload(string name, string contentType, long size, IJSStreamReference stream) + public async Task ImageUpload(string name, string contentType, long size, IJSStreamReference stream) { string? ret = null; await using var data = await stream.OpenReadStreamAsync(size); @@ -279,7 +279,7 @@ public async Task ImageUpload(string name, string contentType, long size { ret = await OnFileUpload(file); } - return ret ?? ""; + return ret; } /// From 0e45de7dca8c06c6275e4cb6460a116a5179a5aa Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 19 Aug 2025 16:31:40 +0800 Subject: [PATCH 3/3] chore: bump version 9.0.7 --- .../BootstrapBlazor.SummerNote.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj b/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj index 365eadf5..5d2d310e 100644 --- a/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj +++ b/src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj @@ -1,7 +1,7 @@ - 9.0.6 + 9.0.7