s3_upload_file {botor}R Documentation

Upload a file to S3

Description

Upload a file to S3

Usage

s3_upload_file(file, uri, content_type = mime_guess(file))

Arguments

file

string, location of local file

uri

string, URI of an S3 object, should start with s3://, then bucket name and object key

content_type

content type of a file that is auto-guess if omitted

Value

invisibly uri

References

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.upload_file

See Also

s3_download_file

Examples

## Not run: 
t <- tempfile()
write.csv(mtcars, t, row.names = FALSE)
s3_upload_file(t, 's3://botor/example-data/mtcars.csv')
unlink(t)
## note that s3_write would have been a much nicer solution for the above

## End(Not run)

[Package botor version 0.3.0 Index]