Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Allow downloads from widgets #7502

Merged
merged 1 commit into from
Jan 20, 2022

Commits on Jan 10, 2022

  1. Allow downloads from widgets

    Notes: Allow downloads from widgets.
    
    We are working on a widget that allows the user to download a file (a ICS calendar entry). Right now the sandbox of the widget iframe doesn't allow downloading. Instead, the following error is displayed in the console (for Google Chrome):
    
    ```
    Download is disallowed. The frame initiating or instantiating the download is sandboxed, but the flag ‘allow-downloads’ is not set. See https://www.chromestatus.com/feature/5706745674465280 for more details.
    ```
    
    Therefore this PR adds `allow-downloads` to the sandbox capabilities.
    
    Steps to reproduce:
    1. Create a simple widget with an `index.html` file like, e.g.
       ```
         <a href="index.html" download>Download</a>
       ```
    2. Host the widget somewhere, add it to the room and open the widget
    3. Click on the download button
      * Without the fix: Nothing happens, there is a warning in the console (see above)
      * With the fix: The file is downloaded
    
    Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
    Fox32 committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    d73023d View commit details
    Browse the repository at this point in the history