2013-08-04 32 views

回答

0

您可以上傳

之前嘗試使用 tempfile模塊寫入到磁盤210
import tempfile 
with tempfile.NamedTemporaryFile(delete=True) as tfile: 
    tfile.write(f.read()) 
    tfile.flush() 
    response = flickr.upload(filename=tfile.name,callback=None,**keywords) 
+2

謝謝!我試過了,但GAE禁用了tempfile。可能我必須更改實施,以使其適用於Google App Engine。 – ipegasus

+0

我沒有想到這一點。 –

+0

看起來像是有一些臨時文件的外表......有了這項工作嗎? https://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/dist/tempfile.py?r=233 – Tombatron

相關問題