Work with User's files
This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IUserFiles>()
and is defined in Telligent.Evolution.Platform.dll
Events
Events.AfterCreate
Handler
void UserFileAfterCreateEventHandler(UserFileAfterCreateEventArgs e);
Events.AfterDelete
Handler
void UserFileAfterDeleteEventHandler(UserFileAfterDeleteEventArgs e);
Events.AfterUpdate
Handler
void UserFileAfterUpdateEventHandler(UserFileAfterUpdateEventArgs e);
Events.BeforeDelete
Handler
void UserFileBeforeDeleteEventHandler(UserFileBeforeDeleteEventArgs e);
Events.BeforeUpdate
Handler
void UserFileBeforeUpdateEventHandler(UserFileBeforeUpdateEventArgs e);
Methods
UserFile Create(Byte[] fileData, string fileName, string folderPath);
Create a User file. OBSOLETE in 12: Use Create overload that takes FileUploadContext instead.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
fileData | Byte[] | File content | Required | ||
fileName | string | Specified file name | Required | ||
folderPath | string | Specified folder path. E.g. 'testolder' | Required |
Return Type
UserFile Create(Stream fileStream, string fileName, string folderPath);
Create a User file. OBSOLETE in 12: Use Create overload that takes FileUploadContext instead.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
fileStream | Stream | File content | Required | ||
fileName | string | Specified file name | Required | ||
folderPath | string | Specified folder path. E.g. 'testolder' | Required |
Return Type
UserFile Create(string fileUploadContext, string fileName, string folderPath);
Create a User file
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
fileUploadContext | string | File Upload Context | Required | ||
fileName | string | Specified file name | Required | ||
folderPath | string | Specified folder path. E.g. 'testolder' | Required |
Return Type
AdditionalInfo Delete(string folderPath, string fileName);
Delete a User file
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
folderPath | string | Specified folder path. E.g. 'testolder' | Required | ||
fileName | string | Specified file name | Required |
Return Type
AdditionalInfo Delete(string folderPath, string fileName, UserFileDeleteOptions options = null);
Delete a User file
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
folderPath | string | Specified folder path. E.g. 'testolder' | Required | ||
fileName | string | Specified file name | Required | ||
options | UserFileDeleteOptions | User's file values for delete operation | Optional |
Return Type
UserFile Get(int userId, string folderPath, string fileName);
Get User File for a user
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | int | Specified a user id | Required | ||
folderPath | string | Specified folder path. E.g. 'testolder' | Required | ||
fileName | string | Specified file name | Required |
Return Type
PagedList<UserFile> List(int userId, UserFileListOptions options = null);
List user files for a user
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | int | Specified a user id | Required | ||
options | UserFileListOptions | User file list get options | Optional |