Right now I'm doing something like:
key.set_contents_from_filename(path, policy='public-read', headers={'Cache-Control': 'max-age=14400'})
When I upload a new file...
m
--
Matt Billenstein
ma...@vazor.com
http://www.vazor.com/
key.set_contents_from_filename(path, policy='public-read',
cache_control='4400')
> --
> You received this message because you are subscribed to the Google Groups "boto-users" group.
> To post to this group, send email to boto-...@googlegroups.com.
> To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
>
>
--
Chris Moyer
My example works and I think the interface is fine, but I was wondering
if there was a way to set a header on a file that's already in s3
without uploading it again.
m
To follow up -- I think this works properly:
>>> k2.copy(bucket.name, k2.key, metadata={'Content-Type' : 'image/jpeg', 'Cache-Control' : 'max-age=3601'})
<Key: static.flingo.tv,02/02100c0c-4e8d-11df-8480-123139023132/me.jpg>
>>> k3 = _
>>> k3.set_acl('public-read')
The ACL doesn't seem to be preserved across the copy, so it needs to be
reset...
--
Chris Moyer
Ah, cool, thanks -- I was looking at the 1.9 docs online and overlooked
this...