İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4810 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

Thank you

I have done it by write;

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Şub 24
1901
3
Mar 20
21524
0
Eyl 19
4515
1
Nis 18
11990
0
Tem 15
3818