Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
9231 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 17
5702
2
มิ.ย. 16
10035
0
ก.ย. 17
5408
0
ก.พ. 16
5207
9
พ.ย. 19
11692