Puts an object into an S3 bucket
put_object(
file,
object,
bucket,
multipart = FALSE,
acl = NULL,
headers = list(),
verbose = getOption("verbose", FALSE),
show_progress = getOption("verbose", FALSE),
...
)put_folder(folder, bucket, ...)
If successful, TRUE
.
A character string containing the filename (or full path) of the file you want to upload to S3. Alternatively, an raw vector containing the file can be passed directly, in which case object
needs to be specified explicitly.
A character string containing the name the object should have in S3 (i.e., its "object key"). If missing, the filename is used.
Character string with the name of the bucket, or an object of class “s3_bucket”.
A logical indicating whether to use multipart uploads. See http://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html. If file
is less than 100 MB, this is ignored.
A character string indicating a “canned” access control list. By default all bucket contents and objects therein are given the ACL “private”. This can later be viewed using get_acl
and modified using put_acl
.
List of request headers for the REST call. If multipart = TRUE
, this only applies to the initialization call.
A logical indicating whether to be verbose. Default is given by options("verbose")
.
A logical indicating whether to show a progress bar for uploads. Default is given by options("verbose")
.
Additional arguments passed to s3HTTP
.
A character string containing a folder name. (A trailing slash is not required.)
This provide a generic interface for sending files (or serialized, in-memory representations thereof) to S3. Some convenience wrappers are provided for common tasks: e.g., s3save
and s3saveRDS
.
Note that S3 is a flat file store. So there is no folder hierarchy as in a traditional hard drive. However, S3 allows users to create pseudo-folders by prepending object keys with foldername/
. The put_folder
function is provided as a high-level convenience function for creating folders. This is not actually necessary as objects with slashes in their key will be displayed in the S3 web console as if they were in folders, but it may be useful for creating an empty directory (which is possible in the web console).
put_bucket
, get_object
, delete_object
, put_encryption