]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: adds a way to allow users set_contents_from_filename for rgw 42880/head
authorMumuni Mohammed <43080869+Kalkulus1@users.noreply.github.com>
Sun, 22 Aug 2021 16:25:20 +0000 (16:25 +0000)
committerMumuni Mohammed <mumunim10@gmail.com>
Mon, 30 Aug 2021 12:31:56 +0000 (12:31 +0000)
Signed-off-by: Mumuni Mohammed <mumunim10@gmail.com>
doc/radosgw/s3/python.rst

index 9f9367e0fcb03f629f2f94554feefc4d8655c41b..6fb314378aced63561a4e2ed2db0ff79c24e6f17 100644 (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