Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
9467 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

Please tell me when you got the answer for this

Awatar
Odrzuć
Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
1
wrz 17
5939
2
cze 16
10430
0
wrz 17
5695
0
lut 16
5515
9
lis 19
12062