Skip to Content
Menú
This question has been flagged
3315 Vistes

Now I want to upload a file-like to a fileds.Binary() field as below codes:

picData = StringIO.StringIO()
plt.savefig(picData)
self.write({"file": base64.encodestring(picData.getvalue())})

shall  I rename the file which is uploaded onto  the fields.Binary()--"file" as "x.xlsx"?

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de des. 19
7418
0
de març 17
3245
0
de nov. 21
2032
5
de jul. 20
9118
1
de febr. 17
7381