How are you retrieving it? Are you setting a content type and content
disposition in the header?

On Sep 24, 8:41 am, winti <stefan.winterb...@gmail.com> wrote:
> Thank you massimo,
> this i tried allready and could store the data but not retrieve in a
> usefull format...
> How is it possible for downloading this stored file in field b
> providing the user a link within web2py ?
> I allways get rubish back or a huge url with the data stored within
> this field.
>
> Stefan
>
> On 24 Sep., 15:21, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > if you have db.define_table('a',Field('b','blob'))
>
> > db.a.insert(b=converted)
>
> > On Sep 24, 4:34 am, winti <stefan.winterb...@gmail.com> wrote:
>
> > > Hello,
> > > i am working on a project where web2py will be used as a online/
> > > offline frontent for mobile users ufor our ERP System.
> > > The communication from web2py to the backend system is implemented
> > > with the soap library suds.
> > > Now i am at the point to deal with exchanging files (pdf,
> > > pictures ....).
> > > Within python i am able to get files from the backend system:
> > > -----
> > > from suds.client import Client
> > > import base64
> > > urlmobileservice =  URL2WDSL
> > > mobileservice = Client(urlmobileservice)
> > > getdok = mobileservice.service.ZMsGetDokuFiles(SERVICEPARAMETERS)
> > > converted=base64.standard_b64decode(getdok.FileXsring)
> > > filename = "/tmp/test.pdf"
> > > file = open(filename, 'w')
> > > file.write(converted)
> > > file.close
> > > ----
> > > The file is saved correctly on the filesystem.
>
> > > Within web2py i would like to save the document (getdok) within the
> > > database as blob.
>
> > > Until now i did not find a proper way to store and retrieve this
> > > documents.
>
> > > Any examples ?
>
> > > Stefan- Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -
>
>

Reply via email to