[web2py] Re: save upload filename in database

2013-12-27 Thread Massimo Di Pierro
Let's isolate the problem. Are you saying that even if you have this: Field('up_file', 'upload', uploadseparate=True, requires =[IS_NOT_EMPTY(), IS_UPLOAD_FILENAME(extension=ext_regex)]), You can submit a form that does not upload a file into up_file? On Thursday, 26 December 2013 13:21:35 UTC

[web2py] Re: save upload filename in database

2013-12-28 Thread Calvin Morrison
More specifically this only happens if I put in the if up_name != None check to set the filename in the database, otherwise it works well On Friday, December 27, 2013 11:48:09 PM UTC-5, Massimo Di Pierro wrote: > > Let's isolate the problem. > > Are you saying that even if you have this: > > Fiel

Re: [web2py] Re: save upload filename in database

2013-12-28 Thread Calvin Morrison
Yes that's exactly the problem! Which in turn causes the other problems I think On Dec 27, 2013 11:48 PM, "Massimo Di Pierro" wrote: > Let's isolate the problem. > > Are you saying that even if you have this: > > Field('up_file', 'upload', uploadseparate=True, requires =[IS_NOT_EMPTY(), > IS_UP

Re: [web2py] Re: save upload filename in database

2013-12-31 Thread Calvin Morrison
Here is my solution! if hasattr(request.vars['up_file'],"filename"): form.vars.filename = request.vars['up_file'].filename if form.process().accepted: redirect(URL('data', 'index')) elif form.errors: response.flash = "form has errors" On 28 December 2013 17:08, Calvin Morrison