From b9f462f97848630d1cd85c943c42f161894b2efe Mon Sep 17 00:00:00 2001 From: Mumuni Mohammed <43080869+Kalkulus1@users.noreply.github.com> Date: Sun, 22 Aug 2021 16:25:20 +0000 Subject: [PATCH] doc: adds a way to allow users set_contents_from_filename for rgw Signed-off-by: Mumuni Mohammed --- doc/radosgw/s3/python.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.47.3