ICEfaces
  1. ICEfaces
  2. ICE-11396

ace:dynamicResource doesn't work as attachment on Pluto

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-4.2.0.GA, EE-3.3.0.GA_P05
    • Fix Version/s: 4.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Pluto portlet container 2.0.3 and 2.1.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
    • Workaround Description:
      Hosting the resources on an external server that doesn't use Pluto or simply instructing the users to right click on the link and select 'Save As...' from the context menu.

      Description

      When the <ace:dynamicResource> component has attachment="true" and fileName="<name>", it is supposed to cause the browser to automatically download the file, instead of opening it on the browser. This is not working on Pluto portlet containers.

        Activity

        Hide
        Arturo Zambrano added a comment - - edited

        Marking as Won't Fix.

        The reason why this is not working is because Pluto is preventing the use of the 'Content-Disposition' header, which is where we can specify to treat the resource as an attachment with the given file name.

        I tried other workarounds and approaches, including using another technique similar to the one used by ace:dataExporter, which consists in initiating a JSF request via a button and then modifying the response to serve the resource, with the appropriate headers. Unfortunately this didn't work. I also tried various tweaks to this approach to try to make it work, but none of them worked, because of the root cause of not being able to use the 'Content-Disposition' header. I also considered using an HTML-only approach, like the 'download' attribute in the anchor element, but this functionality is not widely supported yet by all major browsers.

        The possible workarounds/solutions are hosting the resources on an external server that doesn't use Pluto or simply instructing the users to right click on the link and select 'Save As...' from the context menu.

        Show
        Arturo Zambrano added a comment - - edited Marking as Won't Fix. The reason why this is not working is because Pluto is preventing the use of the 'Content-Disposition' header, which is where we can specify to treat the resource as an attachment with the given file name. I tried other workarounds and approaches, including using another technique similar to the one used by ace:dataExporter, which consists in initiating a JSF request via a button and then modifying the response to serve the resource, with the appropriate headers. Unfortunately this didn't work. I also tried various tweaks to this approach to try to make it work, but none of them worked, because of the root cause of not being able to use the 'Content-Disposition' header. I also considered using an HTML-only approach, like the 'download' attribute in the anchor element, but this functionality is not widely supported yet by all major browsers. The possible workarounds/solutions are hosting the resources on an external server that doesn't use Pluto or simply instructing the users to right click on the link and select 'Save As...' from the context menu.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: