I am attempting to return a file from a web api in my Radzen app. I receive no errors, nothing hangs, but nothing is returned either. Anything to help would be most appreicated. Code below.
[Inject]
HttpClient httpclient { get; set; }
public async Task<FileStreamResult> exportReport (string start, string end)
{
var request = new HttpRequestMessage
{
RequestUri = new Uri("http://127.0.0.1/api/values/?start="+start+"&end="+end),
Method = HttpMethod.Get
};
var response = await httpclient.SendAsync(request);
var stream = await response.Content.ReadAsStreamAsync();
var result = new FileStreamResult(stream,"application/pdf");
result.FileDownloadName = "File.pdf";
return result;
}
I am using the same method I though compared to export. I am using a filestreamresult, I think i mimicked the majority of the content of the export method in the export controller. In debug I am able to verify content of all objects. Its weird, it just doesn't do anything. Only difference is I am calling it asynchronously
I am experiencing a similar issue. My download works; however, after the download, the page requires a reload. I am using NavigationManager, Controllers, everything outlined in the documentation and examples. Is this a Radzen bug??