Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8691 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Please tell me when you got the answer for this

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 17
5247
2
thg 6 16
9390
0
thg 9 17
4712
0
thg 2 16
4475
9
thg 11 19
11049