addFile: Create objects in S3 storage server

Description Usage Arguments Author(s) References See Also

Description

These functions

Usage

1
2
3
4
5
6
addFile(contents, bucket, name = basename(contents), access = NA,
        type = if (is.raw(contents)) "binary/octet-stream" else "text/plain",
        meta = character(), encoding = NA,
        isContents = is.raw(contents) || is(contents, "AsIs"),
        auth = getOption("AmazonS3"), curl = getCurlHandle(),
        virtual = (tolower(bucket) == bucket))

Arguments

contents

the name of a file or the actual contents. To store text directly from and R character string, wrap it as an AsIs object, e.g. I("some text"). One can also specify that this is the content, and not the name of a file, using isContents = TRUE.

bucket

the name of the AWS bucket. One can also specify the bucket and object/file name as "bucket/name".

name

the name of the object within the bucket to remove

auth

a named character vector giving the AWS key and secret as a c(key = secret).

curl

a curl handle that the caller can specif to reuse an existing object that is resused across different libcurl calls.

virtual

a logical value indicating whether to use the virtual host mechanism or s3.amazonaws.com/bucket/obj format. The default argument is most likely the appropriate value.

access

a character string specifying the access for this new object. This should be one of "private", "public-read", "public-read-write", "authenticated-read".

type

the content type of the object being stored. One should use common, recognized types such as image/png, image/jpg, text/html, application/json, ...

meta

a character vector of name - value pairs which specify meta-information about the object being stored.

encoding

if specified, the character encoding of the file.

isContents

a logical value indicating whether the value of contents should be treated as the actual contents to store or the name of a file which contains the contents to be stored.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://docs.amazonwebservices.com/AmazonS3/latest/gsg/

See Also

getFile listBucket


duncantl/RAmazonS3 documentation built on May 15, 2019, 5:26 p.m.