API changes
-
put_objectsplits the use of files vs payload into two separate arguments:whatis now the first positional argument and expects actual content to store,fileis now a named argument used to store file content. The previous use offilefor both was very dangerous as it stored filenames instead of content without warning if the file was not found.Old code that intended to use files such as:
put_object("foo.csv", "bucket")
has to use either of
put_object(file="foo.csv", bucket="bucket") ## or (not recommended) put_object(, "bucket", file="foo.csv")
Any code that used
file=explicitly and no positional arguments doesn't need to change.
Features
put_objectsupports connections, including non-seekable ones