Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
8641 Prikazi

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
Opusti
Best Answer

Please tell me when you got the answer for this

Avatar
Opusti
Avtor

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.

Related Posts Odgovori Prikazi Aktivnost
1
sep. 17
5223
2
jun. 16
9307
0
sep. 17
4667
0
feb. 16
4390
9
nov. 19
10987