Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4809 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

Thank you

I have done it by write;

Related Posts Odpovědi Zobrazení Aktivita
1
úno 24
1901
3
bře 20
21524
0
zář 19
4515
1
dub 18
11990
0
čvc 15
3818