Skip to content

Instantly share code, notes, and snippets.

@timbroder
Created July 24, 2012 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timbroder/3172996 to your computer and use it in GitHub Desktop.
Save timbroder/3172996 to your computer and use it in GitHub Desktop.
keys = ['job_2254-t02240.pdf',
'job_2254-t02240.pdf',
'job_2254-t02244.pdf',
'job_2254-t02241.pdf',
'job_2254-t02242.pdf',
'job_2254-t02293.pdf',
'job_2254-t02243.pdf',
'job_2254-t0220.pdf',
'job_2254-t0221.pdf',
'job_2254-t0222.pdf',
'job_2254-t0000016.pdf',
'smsprime.pdf',
]
for keystr in keys:
key = bucket.lookup(keystr)
print key.content_type
print key.content_disposition
key.copy(key.bucket, key.name, preserve_acl=True, metadata={'Content-Type': 'application/octet-stream',
'Content-Disposition' : 'attachment'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment