Skip to content

npp_usr_save_avatar

Jurek Muszyński edited this page Mar 28, 2024 · 3 revisions

int npp_usr_save_avatar(int user_id)

Description

Saves user avatar. user_id is the user id.

npp_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 NPP_MAX_AVATAR_SIZE (currently 64 KiB).

Returns

Returns OK or one of the error codes:

  • ERR_INVALID_REQUEST
  • ERR_FILE_TOO_BIG
  • ERR_INT_SERVER_ERROR

Example

Notes

Requires NPP_USERS compilation switch.

Clone this wiki locally