Also, you might want to consider using set_contents_from_file(fp)
which takes a file handle (if data is a filename --
set_contents_from_file(open(fp, 'r')).
On May 24, 2008, at 11:21 PM, truebosko wrote:
> def save_s3_data(key, data, content_type):
> k = Key(AWS_BUCKET_NAME)
> k.key = key
> k.set_contents_from_string(data)
---
Patrick Altman
(615) 300-2930
---
Patrick Altman
(615) 300-2930
[Sent from my iPhone]
---
Patrick Altman
(615) 300-2930
[Sent from my iPhone]
--upload-->[ your server doing boto magic ]---upload-to-aws--->[s3
bucket]
the fact that you are streaming bytes through your webserver and then
back out to amazon s3, means you are paying for both inbound and
outbound bytes for the same file.