here is complete code...... anyone see where the problem is? The result is the file gets uploaded, no errors raised, but the content name and file-size are "None" in the resulting record. Session flashes don't display.
db.define_table('UploadedMeetingMaterials', Field('id','id', readable=False, writable=False), Field('meetingID','reference Meeting', requires = IS_IN_DB(db, 'Meeting.id', '%(meetingTitle)s',zero=T('choose one')), readable=False, writable=False), Field('meetingMaterialsTitle','string', length=500, label='Meeting MaterialsTitle',comment='500 characters max'), Field('uploadedMeetingContent','upload'), Field('contents_size', 'integer', writable=False), Field('contents_filename', length=512, writable=False), format='%(meetingMaterialsTitle)s') def upload_meeting_materials(): personID = db.auth_user(auth.user_id) specificOrganization = db.Organization(request.get_vars.specificOrganizationID) specificOrganizationID = request.get_vars.specificOrganizationID specificMeetingCategory = db.MeetingCategory(request.get_vars.specificMeetingCategoryID) specificMeetingCategoryID = request.get_vars.specificMeetingCategoryID specificMeeting = db.Meeting(request.get_vars.specificMeetingID) specificMeetingID = request.get_vars.specificMeetingID response.title=T('Upload meeting materials') response.subtitle = T(specificOrganization.organizationFullName) db.UploadedMeetingMaterials.meetingID.default=request.get_vars.specificMeetingID government_badges(dummy=None) form = SQLFORM(db.UploadedMeetingMaterials) if form.vars.uploadedMeetingContent: session.flash = 'Here I am before form accepted' filesize_ = len(request.vars.uploadedMeetingContent.value) filename_ = request.vars.uploadedMeetingContent.filename form.vars.contents_size = filesize_ form.vars.contents_filename = filename_ if form.process().accepted: redirect(URL('manage_upload_meeting_materials_for_specific_meeting', vars=request.vars)) session.flash = 'Here I am again after form accepted' elif form.errors: response.flash = 'form has errors' return locals() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.