From: Mumuni Mohammed <43080869+Kalkulus1@users.noreply.github.com> Date: Sun, 22 Aug 2021 16:25:20 +0000 (+0000) Subject: doc: adds a way to allow users set_contents_from_filename for rgw X-Git-Tag: v17.1.0~433^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b9f462f97848630d1cd85c943c42f161894b2efe;p=ceph.git doc: adds a way to allow users set_contents_from_filename for rgw Signed-off-by: Mumuni Mohammed --- diff --git a/doc/radosgw/s3/python.rst b/doc/radosgw/s3/python.rst index 9f9367e0fcb0..6fb314378ace 100644 --- a/doc/radosgw/s3/python.rst +++ b/doc/radosgw/s3/python.rst @@ -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