Hi,
We want to download files from vaadin 7 application.
We are reading file content & creating Streamresource from that content.
We have achievevd download functionality in Chrome 33 & Mozilla Firefox however IE 9 is opening the streamresource in the same window instead of downloading the file nad when user tries to go back with browser’s back button he is thrown out of application means vaadin session is dosconnected.
following is the code snippet.
final ByteArrayInputStream arrayInputStream = (ByteArrayInputStream) contentMap.get("content");
final String documentName = (String) contentMap.get("object_name");
StreamResource streamResource = new StreamResource(
new StreamResource.StreamSource() {
public InputStream getStream() {
return arrayInputStream;
}
},documentName);
streamResource.setMIMEType("application/content-stream");
Page.getCurrent().open(streamResource, null, false);
Expecting help on this.