Skip to Content
Menu
This question has been flagged
2448 Views

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
Discard
Related Posts Replies Views Activity
1
Dec 19
6323
0
Mar 17
2420
0
Nov 21
1323
5
Jul 20
7831
1
Feb 17
6282