fix: 5058 - chunk file upload concurrency limit and customizable site settings

This commit is contained in:
David Montesinos
2025-02-05 10:58:43 +01:00
parent 6f588200d7
commit c343e2b40b
5 changed files with 91 additions and 6 deletions

View File

@ -4,6 +4,7 @@ using System.Threading.Tasks;
using System.Text.Json;
using System.Collections.Generic;
using System.Linq;
using System;
namespace Oqtane.UI
{
@ -208,13 +209,19 @@ namespace Oqtane.UI
}
}
[Obsolete("This function is deprecated. Use UploadFiles with MaxChunkSize and MaxConcurrentUploads parameters instead.", false)]
public Task UploadFiles(string posturl, string folder, string id, string antiforgerytoken, string jwt)
{
return UploadFiles(posturl, folder, id, antiforgerytoken, jwt, 1, 0);
}
public Task UploadFiles(string posturl, string folder, string id, string antiforgerytoken, string jwt, int maxChunkSizeMB, int maxConcurrentUploads)
{
try
{
_jsRuntime.InvokeVoidAsync(
"Oqtane.Interop.uploadFiles",
posturl, folder, id, antiforgerytoken, jwt);
posturl, folder, id, antiforgerytoken, jwt, maxChunkSizeMB, maxConcurrentUploads);
return Task.CompletedTask;
}
catch