Skip to content

bug: Fix SignatureDoesNotMatch when putting files with special characters #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion linodecli/plugins/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
from math import ceil
from linodecli.configuration import input_helper

try:
from urllib.parse import quote_plus
except ImportError:
# python2
from urllib import quote_plus


ENV_ACCESS_KEY_NAME = "LINODE_CLI_OBJ_ACCESS_KEY"
ENV_SECRET_KEY_NAME = "LINODE_CLI_OBJ_SECRET_KEY"
Expand Down Expand Up @@ -229,7 +235,7 @@ def upload_object(get_client, args):

for filename, file_path in to_upload:
k = Key(bucket)
k.key = filename
k.key = quote_plus(filename)

print(filename)
k.set_contents_from_filename(file_path, cb=_progress, num_cb=100, policy=policy)
Expand Down