如何在Bluemix中的Object Storage Service中访问容器中的文件? [英] How to access files in container in Object Storage Service in Bluemix?

查看:121
本文介绍了如何在Bluemix中的Object Storage Service中访问容器中的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 如何在Bluemix Object Storage中通过URL访问文件?
  2. 有没有办法将容器公开?
  3. 如何仅通过输入url来访问对象存储中的文件 在浏览器中?
  4. 如何通过url检索图像以在html中显示?
  1. How can I access files by url in Bluemix Object Storage?
  2. Is there a way to make the container public?
  3. How can I access the file in Object Storage just by typing the url in the browser?
  4. How can I retrieve an image by url to display it in html?

推荐答案

最后,这些命令也节省了一天

Finally these too commands saved the day

首先使用swift并更改容器的访问控制

First use swift and change access control of container

swift post container-name --read-acl ".r:*,.rlistings"

接下来使用Curl将容器配置为特定的网址以访问文件

Next Using Curl Configure Container to a particular Url for accessing Files

curl -X GET " https://<access point>/<version>/AUTH_projectID/container-name" -H "X-Auth-Token:<auth token>"     -H "X-Container-Read: .r:*,.rlistings"

也非常感谢Alex da Silva提供的帮助

And also very grateful for the help provided by Alex da Silva

这篇关于如何在Bluemix中的Object Storage Service中访问容器中的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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