Ask Your Question
0

http api for swift to upload objects

asked 2014-10-15 02:34:17 -0500

arun_vav gravatar image

HI,

I have the simialr issue as ( https://ask.openstack.org/en/question... ) - but i'm able to upload/download files from /to container, using CLI. But i'm looking for HTTP access to container, which i'm n't getting. swift stat works fine.

my swift end point is: public/internal url : http://10.100.1.156:8080/v1/AUTH_e4a3. . . controller :http://10.100.1.156:8080

when i try to access http for this url, it gives "This server could not verify that you are authorized to access the document you requested."

root@block1:/# swift stat -v StorageURL: http://10.100.1.156:8080/v1/AUTH_e4a3. . . Auth Token: MII Account: AUTH_e4a3267186b84ba6b2b1233ee15b5a76 Containers: 3 Objects: 42 Bytes: 13183123 Accept-Ranges: bytes ...

Please help me, url tried = 10.100.1.156:8080/v1/AUTH_e4a3267186b84ba6b2b1233ee15b5a76/account - no luck. 10.100.1.156:8080/v1/account/container/objects - no luck

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-02-05 10:03:58 -0500

updated 2015-02-05 11:50:08 -0500

Post the container using command: swift post -r '.r:*' container Later try url => 127.0.0.1:8080/v1/AUTH_e4......./container/object

edit flag offensive delete link more

Comments

What you're doing here is adding an ACL which allows reading from the container without the auth token. Read more http://docs.openstack.org/developer/swift/misc.html#acls (here) and http://docs.openstack.org/api/openstack-object-storage/1.0/content/special-metadata-acls.html (here)

roadmr gravatar imageroadmr ( 2015-02-09 10:39:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-10-15 02:34:17 -0500

Seen: 337 times

Last updated: Feb 05 '15