Skip to Content
मेन्यू
This question has been flagged
1 Reply
9149 Views

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

Please tell me when you got the answer for this

Avatar
Discard
Author

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 Replies Views Activity
1
सित॰ 17
5603
2
जून 16
9934
0
सित॰ 17
5309
0
फ़र॰ 16
5093
9
नव॰ 19
11568