2010年7月17日 星期六

在寫GAE時,如果上傳檔案出現錯誤

TypeError: Blob() argument should be str instance, not unicode

可參考
http://code.google.com/p/googleappengine/issues/detail?id=1784

其中提到

要將From送出的資料改成
enctype="multipart/form-data"(多部分表單張貼)
 
格式才會正常,不然圖片會以UTF8送,發生錯誤。

沒有留言: