Перейти к основному содержимому

Upload a file

POST 

/files

Uploads a file that can later be attached to a post.

This request can either be a multipart/form-data request with a channel_id, files and optional client_ids defined in the FormData, or it can be a request with the channel_id and filename defined as query parameters with the contents of a single file in the body of the request.

Only multipart/form-data requests are supported by server versions up to and including 4.7. Server versions 4.8 and higher support both types of requests.

Permissions

Must have upload_file permission.

Request

Responses

Corresponding lists of the provided client_ids and the metadata that has been stored in the database for each one