URI
<myAccount_uri>/thumbnail[.<format>]
Supported Methods
Parent Resource
Description
The avatar of the current user. Supports modifying the avatar of the current user.
Supported Methods:
- PUT: Modify the avatar of the current user.
Supported output formats: RJSON, JSON, HTML, XML.
Resource hierarchy
HTTP Request Methods
Perform HTTP requests on the following URI. The rjson output format is used as an example, where supermapiportal is the server name.
http://supermapiportal:8190/web/mycontent/account/thumbnail.rjson
PUT Request
Modify the avatar of the current user.
Response Structure
The returned resource representation structure is as follows:
| Field | Type | Description |
| succeed | boolean | Whether the modification of the current user's avatar was successful. |
| customResult | Map<String,Object> | Custom result information, such as the storage path of the avatar. |
| error | HttpError | Error information. This field is not returned if the modification is successful. |
Response Example
Perform a PUT request on the myThumbnail resource: http://localhost:8190/iportal/web/mycontent/account/thumbnail.rjson. The request body is the Base64 encoding of the avatar image (for image upload details, refer to: imageFileUpload resource). The request modifies the avatar of the current user:
/9j/4AAQSkZJRgABAAEAYABgAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCEAAgFBgcGBQgHBgcJCAgJDBQNDAsLDBgREg4UHRkeHhwZHBsgJC4nICIrIhscKDYoKy8xMzQzHyY4PDgyPC4y
MzEBCAkJDAoMFw0NFzEhHCExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMf/EAaIAAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKCwEAAwEBAQEBAQEBAQAAAA
AAAAECAwQFBgcICQoLEAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h
5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+foRAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkj
M1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9
PX29/j5+v/AABEIABYAFAMBEQACEQEDEQH/2gAMAwEAAhEDEQA/APf6ACgAoAKACgAoAKACgAoA/9k=
The rjson format response is as follows:
{
"succeed": true,
"customResult": {
"thumbnail": "http://rdc.ispeco.com/services/../resources/thumbnail/profile/user.png"
}
}
See