Download/View pdf files uploaded using filedescriptor

Hi,
I have written the following code to view the pdf file which is uploaded by user:

InputStream inputStream = fileLoader.openStream(event.getItem().getUcUpl());
byte[] buffer = new byte[inputStream.available()];
inputStream.read(buffer);
exportDisplay.show(new ByteArrayDataProvider(buffer),"certificate.pdf", ExportFormat.PDF);
                

This code works correctly on local but when I deploy on AWS instance it fails to load the pdf. There is no error in logs still unable to fetch the pdf.
Can anyone please suggest here?

Hi, @vaishnavi29051998 !
Which version of cuba patform do you use?
And please see manual how to configure aws

Hi,
Thanks for your reply.
I am using 7.2.13 CUBA version.
Regarding AWS: We have deployed war files on Amazon EC2 instance and using tomact 9 to deploy. The filestorage path of work directory of tomcat is also given correctly but still pdf is not loaded.

HI,
Do you have an icon on the blocking of pop-up windows in the browser address bar?
It happens sometimes that pop-up windows are blocked by a browser and you just need to resolve them