I was storing the images in postgres.  When I tried calling the image
by the filename it returned the coded filename.  When I tried calling
the image blob it returned garbage.

I was just wondering if there was an example on how to call the images
from the database as it isn't mentioned in the manual and I don't know
what takes place on GAE.

On Nov 17, 7:35 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> This is all automatic in web2py is you do not rename the uploaded
> files.
>
> On Nov 17, 7:18 pm, Beerc <berces.las...@fomi.hu> wrote:
>
> > Storing images in database is a bad idea GENERALLY.
> > But on GAE you can't write the file system, so you have no other
> > choice for persistent storage.
>
> > And you will see garbage instead of image if MIME type incorrect or
> > unsetted.
> > In general case the web server (e.g. Apache) will set it for you
> > automatically (if its configuration is correct).
> > But if YOU serve the files (as in case of GAE) instead of the web
> > server, then you must to set the MIME type in the HTTP header. Example
> > for a JPEG file:
> >    Content-Type: image/jpg
> > Seehttp://en.wikipedia.org/wiki/MIMEfordetails.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to