Merge pull request #42880 from Kalkulus1/patch-1

doc: adds a way to allow users set_contents_from_filename for rgw

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2021-11-16 11:01:00 -05:00 committed by GitHub
commit 874b2b304a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,17 @@ This creates a file ``hello.txt`` with the string ``"Hello World!"``
key = bucket.new_key('hello.txt')
key.set_contents_from_string('Hello World!')
Uploading an Object or a File
-----------------------------
This creates a file ``logo.png`` with the contents from the file ``"logo.png"``
.. code-block:: python
key = bucket.new_key('logo.png')
key.set_contents_from_filename('logo.png')
Change an Object's ACL