Prepare step
install.packages('httr')
install.packages('xml2')
install.packages('aws.signature')
install.packages('data.table')
install.packages('path\\to\\QingStorRSDK_0.1', repos = NULL, type="source")
library('Qingstor')
First set as follows in R environment:
Sys.setenv("Qstor_ACCESS_KEY_ID" = "...", "Qstor_SECRET_ACCESS_KEY" = "...", "Qstor_DEFAULT_REGION" = "pek3a")
get an object in memory(now only support csv data, read data as dataframe)
get_object(object = 'object_name', bucket = 'bucket_name')
the object_name could be a name under a folder like 'some_folder/object_name'
put an object in Qingstor bucket
R
tempPath <- file.path("path","to","folder","xxxx.csv")
put_object(file = tempPath , object = basename(tempPath),folder = 'folder_name', bucket = 'bucket_name')
*folder* is optional
delete an object in Qingstor bucket
R
delete_object(object = 'object_name', bucket = 'bucket_name')
the object_name could be a name under a folder like 'some_folder/object_name'
list the object in Qingstor bucket
Note : folder is must, even in the root of the bucket .
R
get_bucket(bucket = 'bucket_name',folder = "/")
prefix is support ,example:
R
get_bucket(bucket = 'bucket_name',folder = "/",prefix = 'prefix_name')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.