Unable to download Images

I have a list of image url’s. They display correctly inside weweb and I am able to open them in a new tab. But when I create a button and workflow to download them I keep getting an error “failed to fetch”. I don’t understand why this is since the images are displaying correctly but why can’t I download them? The images are stores in a Google Storage bucket.

Can we see your workflow?


It’s just a simple download from url.

Here’s the error:

name: “TypeError”

stack: “TypeError: Failed to fetch at wt (https://editor-cdn.weweb.io/public/js/index.4d5dcbad.js:1183:43922) at Proxy.runTest (https://editor-cdn.weweb.io/public/js/index.4d5dcbad.js:1301:247118) at https://editor-cdn.weweb.io/public/js/index.4d5dcbad.js:1301:230401 at https://editor-cdn.weweb.io/public/js/chunk-vendors.fd1268fd.js:1:102875 at a (https://editor-cdn.weweb.io/public/js/chunk-vendors.fd1268fd.js:1:30937) at l (https://editor-cdn.weweb.io/public/js/chunk-vendors.fd1268fd.js:1:31020) at HTMLButtonElement.i (https://editor-cdn.weweb.io/public/js/chunk-vendors.fd1268fd.js:1:89831)”

message: “Failed to fetch”

Interesting, what’s the url you’re trying to download?

@luka here’s the image: https://storage.googleapis.com/buildship-1b6o9y-us-central1/ee7bb406-2cd5-4683-b6b5-fb5c672406e3/2.png

but it’s all images from here.

looks like it is a CORS issue but I’m not sure how to resolve it?

@luka any update or ideas on this? still struggling to get it working and have reached out to buildship also but nothing is working.

I’m going to tag @Alexis here, maybe he can help you since Im not sure what the issue is

CORS issue means the endpoint (here the file url at storage.googleapis.com) cannot be fetched by an external domain.

You can find more documentation here => 교차 출처 리소스 공유(CORS)  |  Cloud Storage  |  Google Cloud

The documentation seems to indicate you can make us of a command line tool (cli) in order to configure CORS on your bucket. What it means is you have to “whitelist” your app domain and weweb editor domain (or use a wildcard “*”) to allow fetching and downloading the file.

By searching google storage cors I found many exemples