Originally by @peterl1084
File download as StreamResource doesn't start with IE8 when content-disposition is specified to attachment. IE8 pops up a new browser window but closes it right away without downloading the file.
Other browser show file download dialog properly.
If content-disposition is not specified files are opened in new browser window instead of downloading them.
Following example code tested to work with (FF 3, 3.5, Opera 9, Safari 4).
Imported from https://dev.vaadin.com/ issue #3366
Attachment added: DownloadApplication.java (0.9 KiB)
Attachment added: DownloadResource.java (1.4 KiB)
Originally by @Artur-
I fail to see the problem in Vaadin in this.
IE8 has a download prompter "automatic prompting for file downloads" (in security settings). If this is OFF there will be a yellow bar showing that the download has been denied by default and you should click it if you want to download the file. This is apparently what happens in the test case although and then IE8 closes the window immediately after that, never showing the bar.
If you enable "automatic prompting for file downloads" it will work as expected.
A better way however seems to be to use "" or "_self" instead of "_blank" (_new is not standard). Then the file will be downloaded in the current window and the possible warning bar is displayed (although it requires a reload of the page to be enabled, way to go IE8).
Originally by Watt Lee
Attachment added: DownloadResource.2.java (1.7 KiB)
AS Artur Signell described: After _new is replaced by _self, the source code works fine. Then I did some modifications and tested with Vaadin 6.3.4/GAE 1.3.4, IE8 report HTTP ERROR 500 as the following.
Is there anything wrong with the source code attached?
HTTP ERROR 500
Problem accessing /APP/1/test.zip. Reason:
Attachment added: GaedltestApplication.java (1.8 KiB)
Tested file download in Google App Enginen using Vaadin 6.6.1 and AppEngine SDK 1.5.1. Found no problems with IE8 (or IE9/Chrome 12/Firefox 5), test case attached.