Fix binary file upload to Swift

Fixes binary files upload to Swift. Prior to this
fix, binary file upload to Swift might fail at unicode
characters interpretation.

Story: 2005697
Change-Id: Icbe69bc628af8bdfd48327319f5c6b01607700bf
This commit is contained in:
Ilya Etingof 2019-05-14 15:21:05 +02:00
parent 0ed13a5085
commit 45020712d7
2 changed files with 6 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class SwiftAPI(object):
operation = _("put container")
raise exception.SwiftOperationError(operation=operation, error=e)
with open(filename, "r") as fileobj:
with open(filename, "rb") as fileobj:
try:
obj_uuid = self.connection.put_object(container,

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes binary files upload to Swift. Prior to this fix, binary file
upload to Swift might fail at unicode characters interpretation.