PutObject: PutObject

Description Usage Arguments Examples

Description

PutObject

Usage

1
2
PutObject(bucketname, key, body = "", encryption = NULL, acl = "private",
  ..., .md5 = TRUE, .meta = NULL, .overwrite = TRUE)

Arguments

bucketname

The bucket name

key

The file path of object on oss.

body

The content of object, character or upload_file(file_path).

encryption

server side encryption algorithm AES256

acl

Access control: private, public-read, public-read-write

...

Set header directly. Cache-Control, Content-Disposition, Content-Encoding, Expires, ...

.md5

boolean Calculate body md5sum automatically or not.

.meta

Other meta info set to the object, < 8k.

.overwrite

overwrite or not. default TRUE

Examples

1
2
3
4
5
6
PutObject('ross-test', 'test.txt', 'test')
PutObject('ross-test', 'test.txt', 'test', encryption = 'AES256')
PutObject('ross-test', 'test.txt', 'test', acl = 'public-read')
PutObject('ross-test', 'test.txt', 'test', .md5 = F)
PutObject('ross-test', 'test.txt', 'test', .meta = list(location='beijing', owner='igenecode.com'))
PutObject('ross-test', 'test.txt', 'test', .overwrite = F)

gahoo/ross documentation built on May 16, 2019, 5:35 p.m.