Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4829 Vizualizări

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?

Imagine profil
Abandonează
Cel mai bun răspuns

hello vx2008 ,

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

Imagine profil
Abandonează
Autor

Thank you

I have done it by write;

Related Posts Răspunsuri Vizualizări Activitate
1
feb. 24
1911
3
mar. 20
21549
0
sept. 19
4518
1
apr. 18
11995
0
iul. 15
3825