On Thursday, July 13, 2017 at 1:03:31 PM UTC-4, Massimo Di Pierro wrote: > > @Anthony, > > could you provide a simple example? >
model: db.define_table('mytable', Field('name'), Field('photo', 'upload')) controller: def main_page(): return dict() def form_component(): return dict(form=SQLFORM(db.mytable).process()) main_page.html view: {{=LOAD('form_component', ajax=True)}} With the above code, the file uploads for the db.mytable.photo field will now work (except in older browsers that do not support FormData). Previously, the way web2py.js handled Ajax form submissions (via jQuery.serialize) did not support file uploads, so the above code would fail to upload files for the db.mytable.photo field. Anthony -- 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.