| ocs_create_share | R Documentation |
Creates different share types:
ocs_create_share(
req,
path,
share_type,
share_with = NULL,
password = NULL,
permissions = 1,
public_upload = FALSE,
expire_date = NULL,
label = "",
note = "",
send_mail = FALSE,
attributes = NULL
)
ocs_create_share_link(
req,
path,
password = NULL,
permissions = 1,
public_upload = FALSE,
expire_date = NULL,
note = "",
label = ""
)
ocs_create_share_mail(
req,
path,
email,
password = NULL,
permissions = 1,
public_upload = FALSE,
expire_date = NULL,
note = "",
label = "",
send_mail = TRUE
)
ocs_create_share_user(
req,
path,
user,
permissions = 1,
public_upload = FALSE,
expire_date = NULL,
note = "",
label = "",
send_mail = TRUE
)
ocs_create_share_group(
req,
path,
group,
permissions = 1,
public_upload = FALSE,
expire_date = NULL,
note = "",
label = "",
send_mail = TRUE
)
ocs_create_share_federated(
req,
path,
cloud_id,
permissions = 1,
public_upload = FALSE,
expire_date = NULL,
note = "",
label = "",
send_mail = TRUE
)
req |
WebDAV request as returned by |
path |
folder or file path |
share_type |
integer 0:user, 1:group, 3:link, 4:e-mail, 6:federated |
share_with |
depending on share type: user id, group id,
e-mail address or federated cloud id (only for |
password |
optional password for link and e-mail shares |
permissions |
integer (1:read, 2:modify, 4:, 8:, 16:share) |
public_upload |
TRUE if public upload should be enabled |
expire_date |
expiration date as string in the format YYYY-MM-DD |
label |
label for the share |
note |
note for the share |
send_mail |
if TRUE the user is notified via e-mail |
attributes |
optional attributes |
email |
e-mail address (only for |
user |
id of the user (only for |
group |
id of the group (only for |
cloud_id |
cloud id (only for |
ocs_create_share - generic method that takes share type as argument
ocs_create_share_user - creates a share for a nextcloud user
ocs_create_share_group - creates a share for a nextcloud group
ocs_create_share_link - create a public share link
ocs_create_share_mail - creates an e-mail share
ocs_create_share_federated - creates a federated share
Notice: if protecting a public link or e-mail share with a password, make sure that the password meets the services' password policy.
information for the newly created share as data.frame
## Not run:
r <- wd_connect("https://example.com/remote.php/dav/files/johndoe")
ocs_create_share(r, "myfolder/share", 4)
ocs_create_share_link(r, "myfolder/share")
ocs_create_share_mail(r, "myfolder/share", "jack@example.com")
ocs_create_share_user(r, "myfolder/share", "jackdoe")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.