mkdir

To create a new folder in the file storage, use the file/mkdir method.

Copied!
svc=file/mkdir&params={"itemId":<long>,
                       "storageType":<uint>,
                       "path":<text>}

Parameters

Parameter Description
itemId Item ID.
storageType Storage type:
1 — public (all users can see and download files),
2 — protected (only users with the View and download files access right to the item can see and download files).
path Relative path from the root folder to the folder you want to create.

Response

If the request is completed successfully, an empty response is returned:

Copied!
{}

If the request hasn’t been completed, an error code is returned.

Error codes

Code Description
1 User not authorized.
4 Invalid input parameters.
5 Failed to create a folder at the specified path.
7 The item specified in the itemId parameter isn’t found, or you have no View and download files and Upload and delete files access rights to it.

If you find a mistake in the text, please select it and press Ctrl+Enter.