Hi
I am trying to initiate a pdf file download from a button. The generation can take a few seconds. If the generation is fast enough I am able to download the PDF. If the file takes too long to generate, the PDF is not downloaded (the “activity bar” on top is not blinking anymore, no exception are logged, but the fiel is not downloaded.
Here is the code to reproduce (maybe delay can differ?)
byte[] buffer = new byte[6026767];
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HH-mm");
String generationDate = sdf.format(now);
Thread.sleep(15000);
downloader.download(buffer, "MyFile_" + generationDate + ".pdf", DownloadFormat.PDF);
If I change the DownloadFormat to OCTET_STREAM it appears to work correctly (but does not open the file in a tab).
Thanks for your help!
Thierry