Closed walik92 closed 4 months ago
Just setting the Url like this will not work - you need to attach it to variable at least:
<RadzenRow>
<RadzenColumn Size="12">
<RadzenUpload @ref="_upload" Url="@url" Accept=".png, .jpg, .jpeg, .tif, .tiff, .bmp, .pdf, .doc, .docx" ChooseText="Choose" Auto="false" Multiple="true" class="w-100">
</RadzenUpload>
</RadzenColumn>
</RadzenRow>
<RadzenRow class="mt-3">
<RadzenColumn Size="12">
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.End" Gap="10px">
<RadzenButton Text="Add" Click="Submit" ButtonStyle="ButtonStyle.Primary" />
</RadzenStack>
</RadzenColumn>
</RadzenRow>
@code {
[Parameter]
public Guid EnrollmentId { get; set; }
RadzenUpload _upload = null!;
string url;
async Task Submit()
{
url = $"upload/single";
if (_upload.HasValue)
{
// this method doesn't send request and nothing happen
await _upload.Upload();
}
}
}
Describe the bug Since 4.28.4 RadzenUpload component doesn't send request with file to server. There isn't any error in console of browser.
To Reproduce To reproduce BUG use below code:
Expected behavior Executing 'Upload' method of '_upload' object will send request with file.
Desktop