Ask Your Question
0

Download file with API

asked 2012-07-27 10:09:55 -0500

rainandtear190985 gravatar image

Hello! I've a problem. When I read the Openstack-object-devguide document, I olny see the how to upload file to swift using curl but not anyway to download file from swift to swiftclien using url. Anybody help me. Thanks you very much

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2012-09-10 03:32:57 -0500

rainandtear190985 gravatar image

Thanks Joshua Colp (jcolp) very much. It help me to solve the problem

edit flag offensive delete link more
0

answered 2012-08-09 14:37:30 -0500

jcolp gravatar image

You can download a file using curl with the following:

curl -o <filename> -H 'X-Auth-Token: <authentication token="">' <storage url="">/<container>/<filename>

For example:

curl -o setup.py -H 'X-Auth-Token: AUTH_tk6253106a51034423b2e3f0ca4b179817' http://127.0.0.1:8080/v1/AUTH_test/bob/setup.py (http://127.0.0.1:8080/v1/AUTH_test/bo...)

This downloads the file 'setup.py' from the container 'bob'.

You can also use the swift application provided by python-swiftclient:

swift -A <url for="" authentication=""> -U <username> -K <key> download <container> <filename>

For example:

swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing download bob setup.py

edit flag offensive delete link more
0

answered 2012-08-09 14:50:44 -0500

jcolp gravatar image

Oh, and if these don't cover what you meant please explain more.

edit flag offensive delete link more

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: 2012-07-27 10:09:55 -0500

Seen: 274 times

Last updated: Sep 10 '12