This needs to be fixed. It is tricky to do but I will put on the todo
list.

On Nov 19, 10:14 am, ecall <edouard.call...@gmail.com> wrote:
> I'm trying to export/import database having an "upload" field stored
> as a blob refered by a "uploadfield".
> Infortunatly, the blob is saved as binary data, this makes the CSV
> file useless... I was expecting that was base64 data.
>
> Is there a way to tell "export_to_csv_file()" to use base64 for the
> blob?
>
> Thx
> Edouard
>
> On Nov 18, 1:41 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > what do you mean by "calling"? The garbage is the image.
>
> > On Nov 17, 11:39 pm, David <digitalcry...@gmail.com> wrote:
>
> > > 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