擅长:python、mysql、java
<p>我没有使用<a href="https://stackoverflow.com/questions/6846333/how-does-cgi-fieldstorage-store-files">How does cgi.FieldStorage store files?</a>中描述的解决方案,而是在表单中使用enctype=“multipart/form data”,并且</p>
<p>在post的handler方法中,我通过以下方式访问了这些文件:</p>
<pre><code>file_content = self.request.POST.multi['myfieldname'].file.read()
</code></pre>
<p>成功了!</p>