谷歌appengine的webapp2有一個非常神祕的documentation regarding the handling of uploaded files。如何處理上傳的文件在webapp2
Uploaded files are available as cgi.FieldStorage (see the cgi module) instances directly in request.POST.
我有一個表單,它使我想存儲在NDB.JsonProperty中的JSON文件的POST請求。
任何人都可以提供一個簡短的例子,我如何從請求對象讀取文件?
POST是否編碼爲'application/x-www-form-urlencoded'或'multipart/form-data'? –
類似的問題:http://stackoverflow.com/questions/6846333/how-does-cgi-fieldstorage-store-files –
Martijn:我正在使用multipart/form-data,我應該使用其他類型嗎? – fccoelho