Currently I am using "uploadfield" option of "Field"/table definition to 
ensure that uploads are stored in DB and not on the filesystem.

While this works, this seems tedious because :

1. I have multiple tables with upload fields. If I forget defining 
"uploadfield" even one of them (or if someone forgets in future, when they 
add a new table) then I will end up having some uploads in the DB, and some 
on the filesystem
2. I need to explicitly "hide" the blob field, otherwise it shows up in the 
SQLFORM.grid

*Is there a cleaner option ?*

I tried defining "db" in models/db.py as follows :

db = DAL('postgres://user:pass@localhost/mydb', pool_size=5, check_reserved
=['all'], adapter_args={'uploads_in_blob': True})

But it does not seem to work

I dug a little, but was unable to find how and where adapter_args were 
used. It seems it is finally passed to self.find_driver - but at least for 
psycopg2 driver

-Mandar


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to