In my simple learning experiment of flask, I have created a form with username,email and file upload. This file will be mailed to other users [Basically an excel sheet]

My script is working great till the last part of file location identification. Now I have read the docs, forums and api of filesystem security and have been trying to use request.files['file'] and enctype="multipart/form-data"

Now, the prob I am facing is if I use enctype, then I get ERR_ACCESS_DENIED when I click on Submit or Next.

Without enctype, the nextpage proceeds well, but displays only the filename with the warning that I should use enctype. To access the filecontents [basically to store in tmp], I tried to use request.files['file'], but end up ERR_ACCESS_DEINED.

The workaround I can think of is use a separate decorator for file and a separate html for file upload, but this, I dont want to do.
Is it possible to have the username/email input along with file input and Next submit with request.files?

The below is the part of code I plan to use to save file to a tmp location

How are you running your application? Are there any errors in the log? Have you tried using a different browser?
– dirnJun 2 '15 at 12:22

I run by python app/run.py.. Sorry for the trouble.. I figured out that the script was directing to a xml instead of xls. [Serves me right for working late night]. I included the ALLOWED_EXTENSIONS for xls and for some reason, xml file is not getting responded. Guess I need another enctype for it.. Thanks again, the webpage is proceeding..
– zXiJun 3 '15 at 14:10