Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
9168 Visualizzazioni

values = {

            'name': 'sample.txt',

            'datas_fname': 'sample.txt',

            'res_model': 'ir.ui.view',

            'res_id': False,

            'type': 'binary',

            'public': True,

            'datas': file_data.encode('utf8').encode('base64'),

        }


All the data are in one line even when I put \n on each line. someone suggested to decode it but I don't know how to decode.

Avatar
Abbandona
Risposta migliore

Please tell me when you got the answer for this

Avatar
Abbandona
Autore

Hello! I got an answer to this, if your using linux, use \r\n instead of \n only. Because there are different way of doing next line depending on OS you use.

Post correlati Risposte Visualizzazioni Attività
1
set 17
5628
2
giu 16
9954
0
set 17
5352
0
feb 16
5134
9
nov 19
11626