Skip to content

File Service Event Handlers

File Upload API

beforeUpload

*argument blocks: *

Request File Path - URL pointing to the location where the file will be stored.

afterUpload

return value block:

Response Result - URL of the location where the file is stored.


Create File from Byte Array

beforeUpload

*argument blocks: *

Request File Path - path to a directory where the file will be stored located

afterUpload

return value block:

Response Result - URL of the saved file.


Get Directory Listing API

beforeUpload

*argument blocks: *

Request File Path - path in the application's file storage to get a listing for.

Request File Pattern - a pattern which the returned files and directories must match.

Request File Recursive - a boolean value of true or false. If present and is true, requests that the listing must be retrieved recursively for all directories contained within Request File Path.

Request Page Size - if present, identifies how many items should be returned in the response.

Request Page Offset - if present, indicates the index of an item in the response from which to get the Request Page Size items.

afterUpload

return value block:

Response Result - A collection of files and directories matching the specified pattern. For more information, see the Return value section of the Directory Listing API documentation.


Get File/Directory Count

beforeCount

*argument blocks: *

Request File Path - path in the application's file storage to get a listing for.

Request File Pattern - a pattern which the returned files and directories must match.

Request File Recursive - a boolean value of true or false. If present and is true, requests that the listing must be retrieved recursively for all directories contained within Request File Path.

Request Page Size - if present, identifies how many items should be returned in the response.

Request Page Offset - if present, indicates the index of an item in the response from which to get the Request Page Size items.

afterCount

return value block:

Response Result - A collection of files and directories matching the specified pattern. For more information, see the Return value section of the Directory Listing API documentation.


Delete File or Directory

beforeDeleteFileOrDirectory

*argument blocks: *

Request File Path - path to a file or a directory to delete.

afterDeleteFileOrDirectory

return value block:

None.


Copy File or Directory

beforeCopyFileOrDirectory

*argument blocks: *

Request File Source Path - a path identifying a file or a directory to be copied. The path starts with the root directory of the application's file storage.

Request File Target Path - a path to a directory where the source file or directory should be copied to. If the directory does not exist, it will be created.

afterCopyFileOrDirectory

return value block:

Response Result - a path to the copied file or the directory.


Move File or Directory

beforeMoveFileOrDirectory

*argument blocks: *

Request File Source Path - a path identifying a file or a directory to be moved. The path starts with the root directory of the application's file storage.

Request File Target Path - a path to a directory where the source file or directory should be moved to. If the directory does not exist, it will be created.

afterMoveFileOrDirectory

return value block:

Response Result - a path to the moved file or the directory.