I have an API that returns a PDF file in the content
is there a way that i can make a button that consumes this api and return the file in the browser to be downloaded ?
the PDF file is big so i will need to await it
I have an API that returns a PDF file in the content
is there a way that i can make a button that consumes this api and return the file in the browser to be downloaded ?
the PDF file is big so i will need to await it
Best answer by abdallaahmed61
i solved the problem by using Task.Run and Task.Wait
and used the
throw new PXRedirectToFileException(new FileInfo("downloaded.pdf", null, memoryStream.ToArray()), true);
that zfebert56 mentioned
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.