Take the 2-minute tour ×

There is a nuisance when my web2Py page uploads a file through SQLFORM, and then redirects the user to the next page with:

redirect(URL('form2', vars=request.vars))

I guess that due to the 'vars' argument, all of the vars, including the entire contents of the uploaded file, appear as the arguments in the url of 'form2.' In other words, when the user is redirected, the url in the browser's url bar appears as [the_url]?file=[file contents],etc. This can obviously cause problems when a large enough file is uploaded.

What is the best way to prevent this from happening? Thanks.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

How about:

del request.vars.file
share|improve this answer
Sorry - overlooked the obvious there. You're right. Thanks! –  Lamps1829 Oct 11 '12 at 12:18

Your Answer


