Search code examples
ibm-cloudopenstack-swift

OpenStack Swift Object Storage File Access?


I'm setting up OpenStack Swift object storage via IBM Bluemix for a few needs in our application. First of all I need a place to securly upload customer files via our API, which this is a perfect solution for.

The portion I'm struggling with is the public piece. Our SAAS product has certian images that are uploaded during account provisioning. These files need to be public accessable via a URL.

I'm able to get the swift SDK to retrieve files with both a token and username/password methods. However I'm not able to find a way to generate a public URL, or to set public access on objects or containers. The documentation seems to be lacking on this too.

Is this possible even? Should I be using a different method for storing public assets?


Solution

  • It is. You can either create temporary URLs for the resources you want to access, or change the settings for your Object Store container to allow read access.

    To modify the container ACL, follow Public URLs For Objects In Bluemix Object Storage Service

    Hints for creating URLs just for some files are at How to create temporary URL for Swift object storage using REST API?