On Thu, Mar 12, 2009 at 6:48 PM, Joe Barnhart <joe.barnh...@gmail.com>wrote:
> > I have a problem. I want to upload a file into my web2py site which > does NOT go into a database, but rather will be processed (it is a CSV > file). If you are going to use the sql.SQLTable.import_from_csv_file, then see how appadmin.py does it; If you want to save it for some later time, then upload as a blob field - it will go into your apps uploads directory. Hope that helps - Yarko > > > The proposed solution is to use form_factory to create the form as > though a database exists (using SQLField objects). When I create the > form with only an "upload" field it seems to make the form correctly, > but submitting it does not trigger the form.accepts() block in the > controller. I can see that > "request.var.my_field_name" has a value, but it is a FieldStorage > object and I'm not sure what to do with it. (FieldStorage is in the > cgi module, not a web2py object.) > > Has anyone done this? I know this is described in the web2py manual, > but the section on this topic has errors and is not sufficiently > developed for me to answer this on my own. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---