Enables scripted content fragments to get user file information.
Properties
Name | Access | Type | Description |
---|---|---|---|
Current | Read | UserFile | Current User File |
Methods
Create
Create Overload 1
Creates a user file
Velocity
#set($userFileResponse = $core_v2_userFile.Create($fileData, $fileName, $folderPath))
JavaScript
var userFileResponse = core_v2_userFile.Create(fileData, fileName, folderPath);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
fileData | Array of Byte | File Data | Required | ||
fileName | String | File Name | Required | ||
folderPath | String | Folder Path | Required |
Create Overload 2
Creates a user file
Velocity
#set($userFileResponse = $core_v2_userFile.Create($fileUploadContext, $fileName, $folderPath))
JavaScript
var userFileResponse = core_v2_userFile.Create(fileUploadContext, fileName, folderPath);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
fileUploadContext | String | File Upload Context | Required | ||
fileName | String | File Name | Required | ||
folderPath | String | Folder Path | Required |
Returns
Delete
Delete Overload 1
Deletes a user file
Velocity
#set($additionalInfoResponse = $core_v2_userFile.Delete($folderPath, $fileName))
JavaScript
var additionalInfoResponse = core_v2_userFile.Delete(folderPath, fileName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
folderPath | String | Folder Path | Required | ||
fileName | String | File Name | Required |
Delete Overload 2
Deletes a user file
Velocity
#set($additionalInfoResponse = $core_v2_userFile.Delete($folderPath, $fileName, "%{ UserId = $userIdArg }"))
JavaScript
var additionalInfoResponse = core_v2_userFile.Delete(folderPath, fileName, { UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
folderPath | String | Folder Path | Required | ||
fileName | String | File Name | Required | ||
UserId | String | Contextual UserId, user whose file we should delete. If not set uses the accessing user. | Optional |
Returns
Get
Gets a user file
Velocity
#set($userFileResponse = $core_v2_userFile.Get($userId, $folderPath, $fileName))
JavaScript
var userFileResponse = core_v2_userFile.Get(userId, folderPath, fileName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required | ||
folderPath | String | Folder Path | Required | ||
fileName | String | File Name | Required |
Returns
List
Lists user files
Velocity
#set($pagedListResponse = $core_v2_userFile.List($userId, "%{ ContentType = $contentTypeArg, FolderPath = $folderPathArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg }"))
JavaScript
var pagedListResponse = core_v2_userFile.List(userId, { ContentType: contentTypeArg, FolderPath: folderPathArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required | ||
ContentType | String | Content Type | Optional | ||
FolderPath | String | Folder Path | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
SortBy | String | Sort By | Optional | Name | ContentLength, ContentType, Name |
SortOrder | String | Sort Order | Optional | Ascending | Ascending, Descending |