| mc_anonymous_set | R Documentation |
This function uses the mc command to set the anonymous access policy for
a specified target.
mc_anonymous_set(
target,
policy = c("download", "upload", "public", "private"),
verbose = interactive()
)
target |
Character string specifying the target cloud storage bucket or object |
policy |
Character string specifying the anonymous access policy. Must be one of "download", "upload", "public" (upload and download), or "private". |
verbose |
print output? |
Returns the list from processx::run(), with components status,
stdout, stderr, and timeout; invisibly.
# create a test bucket on the 'play' server
mc_mb("play/minioclient-test")
# Set anonymous access policy to download
mc_anonymous_set("play/minioclient-test/file.txt", policy = "download")
# Set anonymous access policy to upload
mc_anonymous_set("play/minioclient-test/directory", policy = "upload")
# Set anonymous access policy to public
mc_anonymous_set("play/minioclient-test/file.txt", policy = "public")
# Set anonymous access policy to private (default policy for new buckets)
mc_anonymous_set("play/minioclient-test/directory", policy = "private")
mc_rb("play/minioclient-test")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.