Hi, I use s3 for storing images, I was looking a creating something like this ages ago but my python Fu and web2py Fu were not up to scratch...
I will test this, just wondering if I can change my DB model over,currently I have s3 mounted as a filesystem, so web2py is just writing to a directory. Nils On May 31, 2012 6:56 p.m., "Massimo Di Pierro" <[email protected]> wrote: > Here is an example: > > easy_install pyfilesystem > > >>> import fs.s3fs > >>> myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_ke, aws_secret_key) > >>> db.define_table('test',Field('file','upload',uploadfs = myfs)) > > Now all your uploaded files will go on S3. > Here is a list of supported filesystems: > http://packages.python.org/fs/filesystems.html > > WARNINGS: > - needs testing. I have tested with OSFS and I am confident it works > - I do not think with will work on GAE, should be tested > - uploadfolder and uploadseparate are ignored when uploadfs is specified > (this should be changed, any takers?) > > Should be possible to wrap myfs into an encryption layer but I have not > done it yet. > > We may want a more comprehensive strategy and allow every web2py file > (including apps, sessions, tickets, etc) to go into a pyfilesystem. Is this > necessary? On linux one can mount filesystems in a folder anyway. Is this > more trouble than it is worth? > > Massimo > > > > > >

