콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2587 화면

I have a button where I can attach a csv file and load a series of data contained in this file. However, I would like that once the file is read, the file is stored in another variable of the Binary type so that it can be viewed later. How could I do this? My code to read the csv file is the following:

csv_data = base64.b64decode(self.purchase_order_file)
data_file = io.StringIO(csv_data.decode("utf-8"))
data_file.seek(0)
file_reader = []
csv_reader = csv.reader(data_file, delimiter=',')
file_reader.extend(csv_reader)

아바타
취소
베스트 답변

Hi, you want to save your file in ir_attachment after read ?


Gus

아바타
취소
작성자

Yes, how can i do this after mi code?

관련 게시물 답글 화면 활동
1
3월 24
2307
1
11월 23
4270
3
1월 25
4210
2
5월 24
2635
2
5월 24
2538