如何查看存储在 Google 云存储桶中的图像? [英] How to view an image stored in Google cloud storage bucket?

查看:30
本文介绍了如何查看存储在 Google 云存储桶中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个存储有图像的存储桶,当我使用图像的公共 URL 检索图像时,它会在浏览器中下载它而不是在浏览器中显示图像,如何查看图像而不是下载它.我使用以下 URL 上传图片.

https://www.googleapis.com/download/storage/v1/b/image-downloader-bucket/o/a06266f6-6082-468e-92ca-f918a48533a8?generation=1455661996337000&al;媒体

谁能告诉我如何创建正确的 URL 来查看图像?

解决方案

如果对象是公开可读的,可以直接在https://storage.googleapis.com/BUCKET_NAME/OBJECT_NAME",在您的情况下为 https://storage.googleapis.com/image-downloader-bucket/a06266f6-6082-468e-92ca-f938a8a43>

I have a bucket that has images stored in it , when I retrieve the image using the public URL of the image it downloads it in the browser instead of showing the image in the browser , how can I view the image instead of downloading it. I use the following URL for the uploaded image.

https://www.googleapis.com/download/storage/v1/b/image-downloader-bucket/o/a06266f6-6082-468e-92ca-f918a48533a8?generation=1455661996337000&alt=media

Can someone let me know how to create the right URL for viewing the image ?

解决方案

If the object is publicly readable, you can view it directly at "https://storage.googleapis.com/BUCKET_NAME/OBJECT_NAME", which in your case would be https://storage.googleapis.com/image-downloader-bucket/a06266f6-6082-468e-92ca-f918a48533a8.

这篇关于如何查看存储在 Google 云存储桶中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆