But the question again is where is the file stored, its not appearing in the specified uploads directory for manipulation. What I want to do is upload an excel sheet with specific columns of data, then get the data and insert into db with similar columns On Mar 21, 2013 6:48 PM, "Anthony" <[email protected]> wrote:
> if request.vars.quotes_file: > > > Sorry, I didn't realize this, but apparently if you do "if > [cgi.FieldStorage object]" you get False rather than True, so instead try: > > if hasattr(request.vars.quotes_file, "file"): > > or > > import cgi > if isinstance(request.vars.quotes_file, cgi.FieldStorage) > > > >> I have further noticed this error in the page source after making a >> submit: >> >> > var ajax_error_500 = 'An error occured, please <a >> href="/testapp/default/index?**first_name=bggfbfg&quotes_** >> file=FieldStorage%28%27quotes_**file%27%2C+%27rows+%282%29.** >> csv%27%2C+%27circular.**circular_no%2Ccircular.**recipients%2Ccircular.** >> circular_title%2Ccircular.**circular_date%5Cr%5CnNAZ%2F1%** >> 2F2013%2CALL+MEMBERS+OF+STAFF%**2CLunch+to+be+served+at+the+** >> Motel%2C2013-03-01%5Cr%5Cn%27%**29">reload</a> the page' >> > > That is not an error -- it is just a Javascript variable that is > automatically generated by web2py_ajax.html. It is there in case there is > an Ajax error on the page, in which case it will be used to generate an > error message. However, I notice there is an error in the code used to > generate that variable -- it should not be including post_vars in the link > URL, only get_vars (I have submitted a patch to correct that). > > Anthony > > -- > > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

