Skip to content

Commit

Permalink
Merge pull request ceph#42880 from Kalkulus1/patch-1
Browse files Browse the repository at this point in the history
doc: adds a way to allow users set_contents_from_filename for rgw

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley authored Nov 16, 2021
2 parents 2766946 + b9f462f commit 874b2b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/radosgw/s3/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 874b2b3

Please sign in to comment.