Skip to content

Commit bcc1eb4

Browse files
tschmnejch
authored andcommitted
docs(commits): fix commit create example for binary content
1 parent 01d5f68 commit bcc1eb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/gl_objects/commits.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Create a commit::
4848
# Binary files need to be base64 encoded
4949
'action': 'create',
5050
'file_path': 'logo.png',
51-
'content': base64.b64encode(open('logo.png').read()),
51+
'content': base64.b64encode(open('logo.png', mode='r+b').read()).decode(),
5252
'encoding': 'base64',
5353
}
5454
]

0 commit comments

Comments
 (0)