Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.0.6</Version>
<Version>9.0.7</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public async Task<string> ClickPluginItem(string pluginItemName)
/// <param name="size"></param>
/// <param name="stream"></param>
[JSInvokable]
public async Task<string> ImageUpload(string name, string contentType, long size, IJSStreamReference stream)
public async Task<string?> ImageUpload(string name, string contentType, long size, IJSStreamReference stream)
{
string? ret = null;
await using var data = await stream.OpenReadStreamAsync(size);
Expand All @@ -279,7 +279,7 @@ public async Task<string> ImageUpload(string name, string contentType, long size
{
ret = await OnFileUpload(file);
}
return ret ?? "";
return ret;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down