-
Notifications
You must be signed in to change notification settings - Fork 1k
Unable to download from site preview in MacOS app #5197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you provide a reproducible share link with view permissions please? doesn't need to be original, but we have to be able to reproduce. |
@kof Here is an example, from a site template we’re working on: On that page, you can use the various select inputs to change the colours on the displayed logos. Once a logo has the colours you want, you can download it by clicking the SVG/PNG/WEBP buttons. In Webstudio’s own desktop app — on MacOS — clicking these buttons does nothing. No image is downloaded, and I spent quite a lot of time trying to troubleshoot my scripts… But when the site is published, everything works just as expected, and from the live server the images download without issue. |
does it work in regular chrome? |
It works on all browsers, if you access the published live site. But inside the Webstudio editor, even when we use the built-in preview, it doesn’t. |
@kof I have come across the same issue a second time now, on a page where images are directly linked — not dynamically generated. The page is setup with a gallery of image links, and when the user clicks on one, it downloads the full-size image directly. There are no scripts: everything is setup using just Webstudio's Editor. In the Webstudio app, I can switch to Preview mode and click, click, click to my heart's content, and nothing downloads... As soon as I publish the site, clicking works exactly as expected (by accessing the published site with a browser). Could it be related to the fact that these 'download links' rely on the |
Ref #5197 We prevented all link clicks. Though seems like download is safe to proceed.
Yes, download won't work with different origin. Though here I fixed at least asset downloading #5238 |
Ref #5197 We prevented all link clicks. Though seems like download is safe to proceed when url is relative (asset).
Does that mean we should now be able to download linked images? I've just tried it, and I still cannot do it. To reproduce:
Nothing happens on my end — no image file is downloaded... |
@iocouto whenever something is merged, it doens't mean its been released, make sure to check the release log https://github.com/webstudio-is/webstudio/releases |
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…
The text was updated successfully, but these errors were encountered: