ShareAttachment function
Syntax
ShareAttachment(URLID, DirAndFilePrefix, ShareURL, ShareMode, ShareRole, ExpirationDateTime, AccessToken, UsernameArray)
Description
Use the ShareAttachment function to share files in Oracle Content and Experience Cloud (CEC).
Parameters
| Parameter | Description |
|---|---|
|
URLID |
Specifies an Oracle Content Cloud. |
|
DirAndFilePrefix |
A directory and file name prefix. This is appended to the URLID parameter to get the actual file for sharing. Note: Because the DirAndFilePrefix parameter is appended to the URL, it requires forward slashes (“/”). Backward slashes (“\”) are not supported for this parameter. |
|
ShareURL |
Specifies the URL to access the file that is being shared. |
|
ShareMode |
Specifies the sharing mode assigned to a user. The following modes of sharing are supported:
If no value is passed for this parameter, %ShareMode_PublicRegisteredUsers access is assumed. This is an optional parameter. |
|
ShareRole |
Specifies the role assigned to a user that allows user to view a file, download a file, and modify a file. The following roles are supported:
If no value is passed for this parameter, %ShareRole_Viewer role is assumed. This is an optional parameter. |
|
ExpirationDateTime |
This parameter is used only when the sharing mode is %ShareMode_PublicAnyone or %ShareMode_PublicRegisteredUsers. If a valid date and time are not passed, a public link URL that never expires is created. This is an optional parameter. |
|
AccessToken |
AccessKey is set in the public link that is generated. This parameter is used only when the sharing mode is %ShareMode_PublicAnyone or %ShareMode_PublicRegisteredUsers. If the GENERATEACCESSKEY property is set to Y and
This is an optional parameter. |
|
UsernameArray |
Specifies users who are added as members to the folder, which contains the specified file. This parameter is used only when the sharing mode is %ShareMode_Member. If no value is passed in this parameter, an empty string array is assumed. This is an optional parameter. |
Returns
An integer value (0) irrespective of whether the function is successful or not.
Note:
It is reserved for future use.
Example
Local array of string &user = CreateArrayRept("XYZ", 1);
Local string &url;
ShareAttachment(URLID.PAYSLIP, "PaySlips_XYZ", &url, %ShareMode_Member, %ShareRole_Downloader, , &dt, "", &user);