Hello everyone.
I would like to know if there is a different configuration for uploading files in Net 8. I have the same project working in Net 6, and when I changed it to Net it simply stopped working.
I am using WASM. The method in the API controller in Net 6 is working perfectly, as well as the other Radzen controls, except for Upload that stopped responding. Apparently in the debugs here, we get the impression that it does not trigger the upload process.
We have already tried setting the rendermode to both Server and Auto, but it still did not work. Does anyone have any other tips?
One more detail that I forgot to mention, we pass the Authorization parameter as a parameter in the header (RadzenUploadHeader).
<RadzenUpload @ref="@upload" Auto=false Url="@url" ChooseText="Selecionar" Complete="@OnComplete" Multiple="true" Progress="@((args) => OnProgress(args))" ParameterName="certificado" class="w-100" DeleteText="Remover" Error="@((args) => OnError(args))">
<RadzenUploadHeader Name="Authorization" Value="@token" />
</RadzenUpload>
The upload event is triggered by a separate button.
<RadzenButton Size="ButtonSize.Medium" IsBusy="@enviando" Text="Enviar" Click=@(args=> OnClickEnviar()) />
private async Task OnClickEnviar()
{
if (senha == "")
return;
enviando = true;
url = $"{_httpClient.BaseAddress}api/v1/empresa/atualizar-certificado/{senha}/{(atualizaEmpresasDaMesmaBase ? "true" : "false")}";
upload.Url = url;
StateHasChanged();
await upload.Upload();
}
If anyone has any tips, I would be very grateful.