Skip to content

Unable to download from site preview in MacOS app #5197

@iocouto

Description

@iocouto

Not sure whether this is intended behaviour, or a bug.

I’m working on a site where I’m dynamically generating images that the visitor can download. The site is quite simple: the images are embedded SVG elements, which the visitor can customise via the UI. Then, they can click buttons to download the image in different formats (.svg, .png, .webp, etc.).

The script generates the image in-browser by drawing it on a canvas element, then getting the canvas element to create a blob with an URL, which gets attached to a ‘link’. The link is then sent a ‘click’ event, and the image downloads.

Within Webstudio, when I preview the site and then try to ‘dowload’ the image, I either get a warning, or nothing. The warning tells me to confirm whether I want to “open the URL in an external app”, giving me the option to open, or cancel. In either case, I never get a download.

If I create a share link and preview it in a browser, I see that the site is working as expected, and the images download perfectly fine. There seemt to be no errors in the script, as I’ve checked the console output on both the browser and inside the Webstudio app itself, and no errors given. It just won’t download in Webstudio, which makes testing these scripts a real chore…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions