That works. Thank you very much.
But this solution leads to the next thing.
This upload form (created by the FORM helper) interferes with an
already existing form.
The first form has some text fields, one of them is mandatory. The
form accepts with keepvalues = True.
When I fill in some values in the first form and then upload a file
via the upload form on the same page before submitting the first form,
it will reset the first form.
The accept() methods don't use the session variable as explained by
the book.
Any ideas how I can prevent this from happening?