Search code examples
ibm-cloudobject-storageibm-cloud-tools

How to access files in container in Object Storage Service in Bluemix?


  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?

Solution

  • Finally these too commands saved the day

    First use swift and change access control of container

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

    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"
    

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