Added max file size upload option. Switched from stream upload to multipart form content file upload

This commit is contained in:
2025-03-07 13:31:30 +01:00
parent 9fb1667bf0
commit f23320eb1c
5 changed files with 36 additions and 3 deletions

View File

@@ -47,7 +47,13 @@ public class SysFileSystemProvider : IFileSystemProvider, ICompressFileSystemPro
}
public async Task Create(string path, Stream stream)
=> await HttpApiClient.PostStream($"{BaseApiUrl}/create?path={path}", stream);
{
var content = new MultipartFormDataContent();
content.Add(new StreamContent(stream), "file", "x");
await HttpApiClient.Post($"{BaseApiUrl}/create?path={path}", content);
}
public async Task Move(string oldPath, string newPath)
=> await HttpApiClient.Post($"{BaseApiUrl}/move?oldPath={oldPath}&newPath={newPath}");

View File

@@ -27,7 +27,7 @@
<PackageReference Include="MoonCore" Version="1.8.5" />
<PackageReference Include="MoonCore.Blazor" Version="1.2.9" />
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.5"/>
<PackageReference Include="MoonCore.Blazor.Tailwind" Version="1.3.3" />
<PackageReference Include="MoonCore.Blazor.Tailwind" Version="1.3.4" />
</ItemGroup>
<!--