Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 3.2
-
Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
-
Component/s: ICE-Components, Sample Apps
-
Labels:None
-
Environment:ICEfaces-3.3.0 Build11 (also an issue with ICEfaces 3.2)
Server: Tomcat7
Browsers: IE10/ Firefox20/ Chrome26
-
Assignee Priority:P2
Description
showcase -> ICE Components -> ice:outputResource
All browsers: Downloaded files are missing file extensions (except in filename demo where one is specified)
All browsers: Downloaded files are missing file extensions (except in filename demo where one is specified)
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Committed fix at revision 34494.
Fixed by adding 'fileName' attributes to the ice:outputResource demos in the showcase.
The problem was actually only on IE. Other browsers were able to detect the type of file being downloaded and automatically added an extension. The demos didn't specify any mime type or file name, so the only way to fix this was to explicitly set the file names in the component tag in the app code. The ice:outputResource component is used for any kind of file, so there's no way to magically determine the extension of the file if there's no mime type specified nor file name. While it could be possible to look at the extension of the physical file in the server and then change the extension of the resource path, this would have to be done after the random URL for the resource has been generated by the ResourceRegistry, so it would no longer be a valid URL to access such resource. Also, we cannot dynamically modify the 'fileName' property, based on the extension of the physical file in the server, since this property might be controlled by the application itself, and it might lead to inconsistencies.