Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147476 | Sep 11,2019 11:44 PM UTC | Sep 16,2019 04:59 AM UTC | Blazor | 5 |
![]() |
Tags: File Manager |
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
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.