Skip to Content
मेन्यू
This question has been flagged
1 Reply
4807 Views

in .py file:

picture=fields.Binary(u'Picture')


in .xml file

<field name="picture" widget="image"/>


Now I want to upload a picture('~/1.png') onto "picutre" by python code;

I have tried: self.picuture='~/1.png', but failed; how should I do it correctly?

Avatar
Discard
Best Answer

hello vx2008 ,

you don't have to deal with the upload code the default API method (create ,write,ect ..) will do it for you.

Avatar
Discard
Author

Thank you

I have done it by write;

Related Posts Replies Views Activity
1
फ़र॰ 24
1899
3
मार्च 20
21523
0
सित॰ 19
4515
1
अप्रैल 18
11990
0
जुल॰ 15
3818