Skip to content

Instantly share code, notes, and snippets.

@skabber
Created August 11, 2009 23:21
Show Gist options
  • Save skabber/166177 to your computer and use it in GitHub Desktop.
Save skabber/166177 to your computer and use it in GitHub Desktop.
from boto.s3 import Connection, Key
import sys
conn = Connection()
bucket = conn.get_bucket("skabber-public-images")
acl = bucket.get_acl()
k = Key(bucket)
k.key = sys.argv[1]
k.set_contents_from_filename(sys.argv[1])
k.set_acl(acl)
print k
#https://skabber-public-images.s3.amazonaws.com/home/jgraves/Images/magic-django-pony-iphone.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment