Description Usage Arguments Details Value Author(s) Examples
This function is for uploading a file resource to the S3 cloud.
1 | upload_to_S3(file, remotename, bucket, profile, acl="public-read")
|
file |
The file to upload. |
remotename |
The name this file should have in S3, including any "keys" that are part of the name. This should not start with a slash (if it does, the leading slash will be removed), but can contain forward slashes. |
bucket |
Name of the S3 bucket to copy to. |
profile |
Corresponds to a profile set in the config file for the AWS CLI (see the documentation). If this argument is omitted,the default profile is used. |
acl |
Should be one of |
Uses the AWS Command Line Interface
to copy a file to Amazon S3. Assumes the CLI is properly configured
and that the aws
program is in your PATH. The CLI should be
configured with the credentials of a user who has permission to
upload to the appropriate bucket. It's recommended to use
IAM to set up users
with limited permissions.
There is an RAmazonS3
package but it seems to have issues
uploading files to S3.
TRUE
on success. If the command fails, the function
will exit with an error.
Dan Tenenbaum
1 2 3 4 5 6 | ## Not run:
upload_to_S3("myfile.txt", "foo/bar/baz/yourfile.txt")
# If this is successful, the file should be accessible at
# http://s3.amazonaws.com/annotationhub/foo/bar/baz/yourfile.txt
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.