ICEfaces
  1. ICEfaces
  2. ICE-9188

showcase - ice:outputResource - downloaded files have no file extensions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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)

        Activity

        Carmen Cristurean created issue -
        Carmen Cristurean made changes -
        Field Original Value New Value
        Environment ICEfaces-3.3.0 Build11
        Server: Tomcat7
        Browsers: IE10/ Firefox20/ Chrome26
        ICEfaces-3.3.0 Build11 (also an issue with ICEfaces 3.2)
        Server: Tomcat7
        Browsers: IE10/ Firefox20/ Chrome26
        Ken Fyten made changes -
        Assignee yip.ng [ yip.ng ]
        Security Private [ 10001 ]
        Affects Version/s 3.2 [ 10338 ]
        Affects Version/s 3.3 [ 10370 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Assignee Priority P2 [ 10011 ]
        Ken Fyten made changes -
        Assignee yip.ng [ yip.ng ] Arturo Zambrano [ artzambrano ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34494 Mon Apr 22 15:36:44 MDT 2013 art.zambrano ICE-9188 added 'fileName' attributes to ice:outputResource demos
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/outputResource/outputResourceLabel.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/outputResource/outputResource.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/outputResource/outputResourceType.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/outputResource/outputResourceAttachment.xhtml
        Hide
        Arturo Zambrano added a comment -

        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.

        Show
        Arturo Zambrano added a comment - 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.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA [ 10572 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: