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?