Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 969 Bytes

APIREF-Files.md

File metadata and controls

22 lines (17 loc) · 969 Bytes

API Reference

USERSCHATSCONTACTS • FILES • WEBSOCKETJSON


1. Upload a file

Initiates an uploading stream. In case of success a file name will be returned, which is the same as you've provided in the header or, if omitted, generated by the server in the form of UUID.

Path:

POST /uploads

Headers:

Authorization: Bearer <token>
File-Name: <name>               // prefer `UUID` to avoid a name clash with an existing file
Content-Type: <file_type>       // a file extension such as `png`, `mp4` etc.

Response: a name of the file from which a link can be constructed - http://<your_server[:port]>/files/<file_name>.<file_type>

See also: upload test with an uploading client example.