I had this working a few weeks ago.

I have an upload form which I load into the page using the LOAD helper.

Right now I get an exception when I try to upload.

Here is the code.

def upload_contacts():
form = FORM(INPUT(_type='file', _name='data',requires=[IS_NOT_EMPTY()]), INPUT(_type='submit'))

        if form.accepts(request):


contact_list = request.vars.data #I also tried form.vars.data.file Exception about data being a string.

            ...csv processing left out for brevity

I am just trying to access the file at this point.

I followed the example in the book in DAL for uploading CSV data.
http://web2py.com/book/default/chapter/06#CSV-%28one-table-at-a-time%29

Reply via email to