Most of it is done in the Field.store() method in sql.py. In fact you
can do

db.mytable.insert(filefield=db.mytable.filefield.store(stream,filename='original_filename.txt'))



On Apr 22, 3:27 pm, greenpoise <danel.sega...@gmail.com> wrote:
> wow thats rough!! over 3,000 lines of coding.  thanks!!   :-)
>
> On Apr 22, 4:07 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
>
> > Take a look at welcome/controllers/default.py->def download
>
> > Andhttp://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#291
>
> > Andhttp://code.google.com/p/web2py/source/browse/gluon/sql.py#2667
>
> > Andhttp://code.google.com/p/web2py/source/browse/gluon/sql.py#2694
>
> > Andhttp://code.google.com/p/web2py/source/browse/gluon/sql.py#3292
>
> > I think there are a couple more locations too... specifically web2py
> > will rename the file to something safe....
>
> > --
> > Thadeus
>
> > On Thu, Apr 22, 2010 at 2:54 PM, greenpoise <danel.sega...@gmail.com> wrote:
> > > My question is, which controller takes careof the upload field in
> > > web2py???  Web2py makes it easy to upload a file but I want to know
> > > how it does it so I can write a function based on it.
>
> > > Thanks
>
> > > dan
>
> > > --
> > > Subscription 
> > > settings:http://groups.google.com/group/web2py/subscribe?hl=en

Reply via email to