简体   繁体   中英

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?

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM