Hi
When I add RadzenUpload (Upload client-side without Url) to a page, it shows an error as shown in the image below
Hi
When I add RadzenUpload (Upload client-side without Url) to a page, it shows an error as shown in the image below
I'm unable to replicate the same on our demo:
Hi enchev
I have used the code in the demo page
<RadzenCard Variant="Variant.Outlined">
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Upload client-side without Url</RadzenText>
<RadzenUpload Multiple="true" Change=@OnClientChange Style="width: 100%"
InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "select file" }})" />
</RadzenCard>
void OnClientChange(UploadChangeEventArgs args)
{
console.Log($"Client-side upload changed");
foreach (var file in args.Files)
{
console.Log($"File: {file.Name} / {file.Size} bytes");
try
{
long maxFileSize = 10 * 1024 * 1024;
// read file
var stream = file.OpenReadStream(maxFileSize);
stream.Close();
}
catch (Exception ex)
{
console.Log($"Client-side file read error: {ex.Message}");
}
}
}
Hi enchev
RadzenUpload with the Url property does not cause an error
<RadzenCard Variant="Variant.Outlined">
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Single file upload</RadzenText>
<RadzenUpload Url="upload/single" Progress=@(args => OnProgress(args, "Single file upload")) Style="width: 100%" InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "select file" }})">
</RadzenUpload>
</RadzenCard>
Hi enchev
When I tested, the error only occurred when opening the project with Visual Studio, but it didn't happen when opening it with Radzen Blazor Studio.