El 30/10/13 09:32, de...@stuess.de escribió:
Hi Ricardo,
do you *really* have to save Image data in db fields?
Could you not only save a link to a generic folder holding the images and only save the path of it?

If the image is in the db it will be protected by db security and permissions, if you have the image in a directory then you would have part of your security tied to the db and part of it tied to the OS permissions. I'd rather not.
There is a comment by Ed in the Wiki which says
""" Turns out some of the db modules use buffer, some use array.array, some use str to represent blobs. I just made "L" map to str, as Python's str object can handle any-length binary data just fine.""" ( http://wiki.dabodev.com/DataTypes) So may be that is what's going on, as the buffer type is mapped to a string object the framework is trying to decode it and finds some binary value that can't be decoded.


You have to encode your images in .save() (and obviously decode them before loading from db).
Hope this helps,


Thanks Frank, I'll give it a try. Problem with this is that I will have to find out some hook or method where I can perform both conversions in the Bizobj, or in the dImage (maybe I can find a hook before the controls renders the image). Or, I will have to manage without the help of having the control associated to a DataSource.
Thanks a lot.





--- StripMime Report -- processed MIME parts ---
multipart/alternative
 text/plain (text body -- kept)
 text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/52719c29.2090...@gmail.com

Reply via email to