Commit 2c80e2f4 authored by Christian Salzmann-Jaeckel's avatar Christian Salzmann-Jaeckel
Browse files

boto: add upload, generate_url example

parent da660c9d
......@@ -26,5 +26,16 @@ for bucket in conn.get_all_buckets():
created = bucket.creation_date)
)
# upload file
#bucket = conn.get_bucket(s3_bucket_name)
#key = bucket.new_key('hello.txt')
#key.set_contents_from_string('Hello World!')
bucket = conn.get_bucket(s3_bucket_name)
hello_key = bucket.get_key('hello.txt')
hello_url = hello_key.generate_url(0, query_auth=True)
print(hello_url)
# create bucket
# bucket = conn.create_bucket(s3_bucket_name)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment