I use a computed field to create and save thumbnails:
Field('image_display', 'upload',
uploadfolder=request.folder+'static/uploads',
compute=lambda r: resize_image(r['image'], (320,320),
'display'),
readable=False, writable=False),
def resize_image(image, size, pat
Hi,
I forgot about Mounting S3 as partition, I'm already using the boto interface.
The computer field sounds like an Idea, but now to come up with the code :)
Thanks for the tips.
Regards,
Nils
On Tue, Jul 26, 2011 at 6:32 AM, howesc wrote:
> pbreit might be right - you would still end up upl
pbreit might be right - you would still end up uploading the file to your
server, and then saving to s3. (though if your server was ec2 there might
be a way to mount an s3 bucket, not sure though).
i also agree on looking at the boto interface:
http://code.google.com/p/boto/ i'm using an olde
And you might want to have a look at "boto" for a Python interface to
Amazon.
Creating a custom filed type seems unnecessary. "upload" fields end up just
being filenames. Perhaps you could have a compute field that uploads the
image to S3. Retrieving should just be a simple URL reference.
Hi,
This is what I have done so far, really rough.
I have extended the Field class and added some extra functions.
I called the class s3upload and I created function within the class
called s3_store and s3_retrieve.
I was just wondering if upon creating these classes. I.E creating the
same funct
6 matches
Mail list logo