Hello Massimo! It worked by removing the dbio part. I originally found that in another post as the application was crashing with a file related error.
Many many thanks! Jason. :-) On Aug 26, 9:13 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > Do you know that GAE does allows more than 1MB uploads? > dbio = False means you do not want any database IO. > > On Aug 26, 12:50 pm, jasquigl <jasqu...@gmail.com> wrote: > > > > > Hi Everyone! > > > I am trying to upload a file using snippets of code I have seen in > > other posts and in the manual using GAE locally. It simply does not > > create an entry in the document table. Could somebody please look at > > my code and tell me where I am going wrong. > > > Many thanks, > > Jason. > > > manage.py: > > > @auth.requires_login() > > def upload(): > > form = SQLFORM(db.document) > > > if form.accepts(request.vars, session, dbio = False): > > response.flash = BEAUTIFY(request) > > elif form.errors: > > response.flash = BEAUTIFY(form.errors) > > > return dict(form = form) > > > db.py: > > > db.define_table('document', > > Field('doc_name'), > > Field('pdf', 'upload', uploadfield = 'pdf_data'), > > Field('pdf_data', 'blob', writable = False, readable = False, > > default > > = ''), > > )