[web2py] Re: Storing the Original Filename in the official web2py book

2015-10-20 Thread 黄祥
i think it's dillema in here if request.vars.image != None: # this work when the image is there, can't work if the image is empty (leave blank), it return an error traceback said : AttributeError: 'str' object has no attribute 'filename' if request.vars.image: # this work when the image is blank

[web2py] Re: Storing the Original Filename in the official web2py book

2011-01-14 Thread selecta
no need to store the original filename record = db(db.mytable.id==1).select().first() filename, file = db.mytable.uploadfield.retrieve(record.uploadfield) A('%s'%filename, _href = URL(request.application, 'default', 'download', args = [record.uploadfield])) On Jan 14, 9:29 am, cjrh wrote: > bump

[web2py] Re: Storing the Original Filename in the official web2py book

2011-01-14 Thread cjrh
bump

[web2py] Re: Storing the Original Filename in the official web2py book

2011-01-13 Thread cjrh
On Jan 12, 5:57 pm, carlo wrote: > if request.vars.image!=None ## always True > > should be > > if request.vars.image I changed the book recently, on the basis of this issue on the web2py Google Code site: http://code.google.com/p/web2py/issues/detail?id=110&can=1&q=image If you have further in