如何使用"img src"引用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 ),但不起作用...

(as per https://developers.google.com/storage/docs/access-public-data) but it doesn't work...

如果您想在存储桶"中查看图像并浏览存储桶的目录结构,则该URL很好,但是如果您想直接链接至图像,则该URL就没有用了.

That URL is fine if you want to see the image in the "bucket" and browse the bucket's directory structure, but useless if you want to link to the image directly.

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

I can go here https://console.developers.google.com/m/cloudstorage/b/(bucket-name)/o/google/cube.jpg to link directly to the image, BUT is this "/m/cloudstorage/b/" an arbitrary location or can I always find my images in there? Also what is "/o/" that's not a subdirectory I created. Are these random letters of the alphabet or is there a method to Google's madness or is it always "/o/" ?

简而言之,直接链接到我的Google Cloud Storage映像的正确方法是什么?

In short, what's the correct way to directly link to my Google Cloud Storage images?

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

That URL is for the developer's console UI.

有关访问点列表,请参见请求URI .

See Request URIs for a list of access points.

您可能想要:

https://storage.googleapis.com/bucketname/google/cube.jpg