Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbcc1eb4

Browse files
tschmnejch
authored andcommitted
docs(commits): fix commit create example for binary content
1 parent01d5f68 commitbcc1eb4

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)

[8]ページ先頭

©2009-2025 Movatter.jp