This works fine for me:
import fs.s3fs
myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key)
db.define_table('image',Field('image','upload',uploadfs = myfs))
however, when I run this (which has worked in the past):
db.image.insert(image=db.image.image.store(StringIO.StringIO(blob,
Hi Massimo,
I'm trying to follow the direction you mentioned, but I got 403 Forbidden
Error whenever I tried to upload a file.
The fs is of version 0.5.4.
Is there any specific configuration need to be done on the S3 ?
On Tuesday, September 8, 2015 at 9:49:26 PM UTC-5, Massimo Di Pierro wrote:
No. Only upload type fields can go on filesystem. The others by definition
go in db.
On Tuesday, 8 September 2015 00:30:56 UTC-5, Mark Graves wrote:
>
> Right.
>
> No worries.
>
> What about a field of type blob?
>
> Will that also accept an uploadfs argument and act the same way?
>
> Or do I hav
Right.
No worries.
What about a field of type blob?
Will that also accept an uploadfs argument and act the same way?
Or do I have to store it as an upload?
On Mon, Sep 7, 2015 at 10:38 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Sorry for the late reply:
>
> pip install fs
>
Sorry for the late reply:
pip install fs
Then on model:
import fs.s3fs
myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key)
db.define_table('image',Field('image','upload',uploadfs = myfs))
which is what you suggest basically. Should work our of the box.
On Sunday, 6 September 20
5 matches
Mail list logo