2011-01-11 11 views

答えて

3

これらの質問は、web2pyメーリングリストでお尋ねください。つまり、専門家はいます。ここでは、web2pyの専門家ではないかもしれない人々によって一般的な回答を得る傾向があります。とにかく。

image=URL(r=request,f='nonhomog_plot') 

私はnonhomog_plotがファイルをストリームweb2pyのアクションであると仮定し
image=URL('nonhomog_plot.png') 

ように書き換えることができます。

def nonhomog_plot(): 
    return response.stream(open('filename.png','rb')) 

のようなものは、今、あなたは

def nonhomog_plot(): 
    filename='Figure1.png' 
    response.headers['Content-Disposition']='attachment; filename='+filename 
    return response.stream(open('filename.png','rb')) 
+0

感謝を追加することができます!それは助けになった! – user569474

関連する問題