When attempting to download XML or Jpeg files with the control when viewing the control in a java SWT widget on the Mac clicking the 'download' button does nothing. Downloading of other file types in this situation works fine. The following are lines from the IIS log on the server:
This is when downloading an XML file on the Mac through Safari. This works fine.
GET /myfiles/fileultimate/Download rootFolderID=0&relativePath=&fileName=myxmlfile.xml 80 - 198.145.0.18 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_6_8)+AppleWebKit/534.50+(KHTML,+like+Gecko)+Version/5.1+Safari/534.50 200 0 0 15
This is when downloading an XML file on the Mac through a java SWT Browser widget. This for some reason does not work.
GET /myfiles/fileultimate/Download rootFolderID=0&relativePath=&fileName=myxmlfile.xml 80 - 198.145.0.18 Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10_6_8)+AppleWebKit/534.50+(KHTML,+like+Gecko)+Safari/522.0 304 0 0 31
Downloading of all other file types through the control when using a java SWT Browser widget on Mac works fine. Downloading XML files through a java SWT Browser widget on PC works fine. Downloading XML files through the Safari browser (not the SWT Browser widget) on Mac works fine.
Does anyone know what's going on here?
Thanks,
Jeff
J Fassler
11/16/2011 8:33 AM
It seems SWT Browser widget on Mac does not obey Content-Disposition header.
When downloading files FileUltimate will send "Content-Disposition: attachment;" to force the browser to save the file instead of opening it inline. Almost all browsers obey this header regardless of the file type. However it seems SWT Browser widget on Mac ignores this header for the file types which can be displayed inline within the browser window such as xml and jpeg files. That's why you won't notice the same behaviour with zip files as they can not be displayed inline so the browser has no choice other than saving the file.
FileUltimate uses a hidden iframe for downloads so clicking the 'download' button seems to be doing nothing but actually it causes the file to be displayed inline within the hidden iframe.
In short, this is not a fault of FileUltimate as it implements the standards.
You should examine updates or settings for SWT Browser widget on Mac which can change this behaviour.
If you can't solve the issue with the widget then let me know and maybe we can figure out a workaround (like faking the file type).
Cem Alacayir
11/16/2011 1:33 PM