Skip to content

silgy_usr_save_avatar

Jurek Muszyński edited this page Sep 5, 2019 · 1 revision

int silgy_usr_save_avatar(int ci, int uid)

Description

Saves user avatar. ci is the connection index passed by the engine to silgy_app_main(). uid is the user id.

silgy_usr_xxx functions directly read the query string / payload data.

Request must contain the following parameters:

  • data

It needs to be an image file uploaded as a multipart payload. File size must not exceed MAX_AVATAR_SIZE (currently 64 kB).

Returns

Returns OK or one of the error codes:

  • ERR_INVALID_REQUEST
  • ERR_FILE_TOO_BIG
  • ERR_INT_SERVER_ERROR

Example

Notes

Requires USERS compilation switch.

Clone this wiki locally