인프런 커뮤니티 질문&답변
답변 1
0
좋은사람
지식공유자
맞습니다. 형직님
jpeg , 영상, exe 등은 바이너리 모드로 등록하셔야 합니다.
On Windows, 'b' appended to the mode opens the file in binary mode, so there are also modes like 'rb', 'wb', and 'r+b'. Python on Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written. This behind-the-scenes modification to file data is fine for ASCII text files, but it’ll corrupt binary data like that in JPEG or EXE files.





