コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
9199 ビュー

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.

アバター
破棄
最善の回答

Please tell me when you got the answer for this

アバター
破棄
著作者

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.

関連投稿 返信 ビュー 活動
1
9月 17
5661
2
6月 16
9976
0
9月 17
5377
0
2月 16
5155
9
11月 19
11648