如何使用"img src"引用Google云端存储图像(直接链接到图像)

PJ *_*net 6 google-cloud-storage

说我这样做

./gsutil cp /home/blah/blah/post-images/google/cube.jpg gs://(bucket-name)/google/cube.jpg

图像应该在这里

<img src="https://console.developers.google.com/storage/(bucket-name)/google/cube.jpg

(根据https://developers.google.com/storage/docs/access-public-data)但它不起作用......

如果您想在"桶"中查看图像并浏览存储桶的目录结构,那么该URL就可以了,但如果您想直接链接到图像,则无用.

我可以到这里https://console.developers.google.com/m/cloudstorage/b/(bucket-name)/o/google/cube.jpg直接链接到图片,但这是"/ m/cloudstorage/b /"任意位置还是我总能在那里找到我的图像?什么是"/ o /",这不是我创建的子目录.这些字母是随机的字母还是谷歌疯狂的方法,还是总是"/ o /"?

简而言之,直接链接到我的Google云端存储图像的正确方法是什么?

jte*_*ace 12

该URL用于开发人员的控制台UI.

请参阅请求URI以获取访问点列表.

你可能想要:

https://storage.googleapis.com/bucketname/google/cube.jpg
Run Code Online (Sandbox Code Playgroud)