Browserframe problem with pdf in chrome

Hi there, i’m using this code to visualize a pdf in a browserframe

browserFrame.setSource(StreamResource.class)
            .setStreamSupplier(() -> new ByteArrayInputStream(bytes))
            .setMimeType("tapplication/pdf");

Is all ok but in chrome, when i click on the download icon, the browser can’t recognize the pdf file and it doesn’t put the .pdf extension. With firefox the problem there isn’t. Can i do something to resolve this problem? Users usually doesn’t put the .pdf extension when they try to download a file and can’t open the file.

anyone can help me? :pray:

May be not the source of your problem, but you have a typo in the mime type.
It should be “application/pdf”

hi alexander is a grammatical error…but it is not the problem… :slight_smile: