Re: [web2py] Re: upload - S3 storage

2011-07-26 Thread pbreit
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

Re: [web2py] Re: upload - S3 storage

2011-07-26 Thread nils
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

[web2py] Re: upload - S3 storage

2011-07-25 Thread howesc
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

[web2py] Re: upload - S3 storage

2011-07-25 Thread pbreit
And you might want to have a look at "boto" for a Python interface to Amazon.

[web2py] Re: upload - S3 storage

2011-07-25 Thread pbreit
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.

[web2py] Re: upload - S3 storage

2011-07-25 Thread Nils Olofsson
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