-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Uploading a large object to OBS with a large file-like python object fails with "EntityTooLarge":
>>> fh = open('/media/largefile_10G', 'rb')
>>> conn.obs.create_object(container='*****', name='deleteme', data=fh)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/var/lib/linux/git/python-otcextensions/otcextensions/sdk/obs/v1/_proxy.py", line 391, in create_object
return self._create(
^^^^^^^^^^^^^
File "/var/lib/linux/git/python-otcextensions/otcextensions/sdk/sdk_proxy.py", line 151, in _create
persist = res.create(
^^^^^^^^^^^
File "/var/lib/linux/git/python-otcextensions/otcextensions/sdk/obs/v1/obj.py", line 271, in create
self._translate_response(response)
File "/var/lib/linux/git/python-otcextensions/otcextensions/sdk/obs/v1/obj.py", line 173, in _translate_response
exceptions.raise_from_response(response, error_message=response.text)
File "/var/lib/linux/git/python-otcextensions/otcextensions/common/exc.py", line 286, in raise_from_response
raise cls(
openstack.exceptions.BadRequestException: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload exceeds the maximum allowed object size.</Message><RequestId>00000198E0A7697E48204999EF4DBAF6</RequestId><HostId>5lElwIP975dTQnmAhIGSYnF2SGOppJIG7NFGJvYBQdwpsN+t1jpPPGb5OwvVjC7D</HostId></Error>: Client Error for url: https://*****.obs.eu-de.otc.t-systems.com/deleteme, Bad Request
It seems like there is no way to request a upload with multiple segments, when using "data".
When uploading by using "filename", create_object seems to switch automatically to a upload with multiple segments when needed.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request