[web2py] Re: How to get the filename from an upload field?

2010-06-02 Thread Sverre
Thank you, that was the solution I've seached for. On 2 Jun, 13:21, "hamdy.a.farag" wrote: > assuming you've > > def index(): >     form = SQLFORM(db.tab) >     if form.accepts(request.vars, session): >         response.flash = 'x' >     records = db().select(db.tab.ALL) >     return dict(form=fo

[web2py] Re: How to get the filename from an upload field?

2010-06-02 Thread hamdy.a.farag
oh btw the image part should look like: {{=IMG(_src=URL(r=request, c='default', f='download', args=[record.x]))}} On Jun 2, 2:21 pm, "hamdy.a.farag" wrote: > assuming you've > > def index(): >     form = SQLFORM(db.tab) >     if form.accepts(request.vars, session): >         response.flash = 'x

[web2py] Re: How to get the filename from an upload field?

2010-06-02 Thread hamdy.a.farag
assuming you've def index(): form = SQLFORM(db.tab) if form.accepts(request.vars, session): response.flash = 'x' records = db().select(db.tab.ALL) return dict(form=form, records=records) then in view you can do something like: {{extend 'layout.html'}} {{=form}}

[web2py] Re: How to get the filename from an upload field?

2010-06-02 Thread Sverre
Not really. The information about the filename must be coded into the filename in the uploadfolder. But how to get the filename? On 2 Jun, 11:10, Thadeus Burgess wrote: > Taken fromhttp://web2py.com/book/default/section/7/2?search=original+filename > > Occasionally you may want to store the origi