public static class FileUtils
{
public async static ValueTask SaveAs(this IJSRuntime js, string filename, byte[] data)
=> js.InvokeAsync<object>(
"saveAsFile",
filename,
Convert.ToBase64String(data));
} |
Hi Eric,Greeting from Syncfusion.We have checked with your query that you can’t download the files. Since the result of the method is a Task, we need to use the await for the task to get completed henceforth the method must be a declared as an asynchronous. So, kindly make the method as async as shown in the below code snippet to resolve the issue at your end.
public static class FileUtils{public async static ValueTask SaveAs(this IJSRuntime js, string filename, byte[] data)=> js.InvokeAsync<object>("saveAsFile",filename,Convert.ToBase64String(data));}Regards,Prem Kumar M
Hi Eric,
Thanks for contacting Syncfusion support.The error log which was shared from your end is run time error. From the provided error-log, we can’t predict in exact use case or what you have tried in your application. Since the error was originated your application-level method(createPowerPoint). So, can you please share the below details will be more helpful to provide a proper solution for your requirement.
- Share the code blocks of the application.
- If possible share the application
Regards,Prem Kumar M