Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4641 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

Thank you

I have done it by write;

Post Terkait Replies Tampilan Aktivitas
1
Feb 24
1759
3
Mar 20
21390
0
Sep 19
4457
1
Apr 18
11850
0
Jul 15
3718