İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
17837 Görünümler

I need to store audio file from web url in binary field. now it's stored as unknown format. but, i need it's original file format like .mp3. can anyone show me the way?

Avatar
Vazgeç
En İyi Yanıt

Pls. check this module: https://www.odoo.com/apps/modules/11.0/audio_field/
hope it will help you.
or you can add name of that file like abc.mp3 in file_name field.

Avatar
Vazgeç
Üretici

Hi, can you provide a way in python if possible, because i'm not familiar with javascript. Thank you

when you are creating file from the code of python just add name in name field test.mp3

En İyi Yanıt

In .py file

attachment = fields.Binary(string="Attachment")    
store_fname = fields.Char(string="File Name")

In .xml file                               

<field name="store_fname" invisible="1" />
<field name="attachment" filename="store_fname" />

Hope this helps you

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Nis 18
8828
2
Tem 24
2750
1
Haz 24
5202
1
Eki 23
10932
1
Eki 23
98