We can solve this but the internal logic is going to be convoluted. The 
problem is that you cannot read the content after then record has been 
created and not before. Can you help me test something?

db.define_table('blobs',
Field('image', 'upload'),
)
db.define_table('table1',
Field('image', 'upload',uploadfield=db.blobs.image),
)
db.table1.insert(image =  open('test.jpg', 'rb'))

Does this work? Can you then download the image?

On Sunday, 3 February 2013 03:30:20 UTC-6, Sebastian Cambeo wrote:
>
> OK, I created a minimal scenario for reproducing the error:
>
> append these lines to the welcome db.py, create test.jpg in root folder 
> and deploy directly to GAE:
>
> db.define_table('table1',
> Field('image', 'upload'),
> )
> db.table1.insert(image =  open('test.jpg', 'rb'))
>
>
> Then call welcome/appadmin and you will see that clicking on the "file" 
> link downloads an empty image because the blob data is empty.
> table1.idtable1.imagetable1.image_blob37001*file*None
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to