POST api/Avatar?crop={crop}
Sets the avatar for the logged-in user. This method must be called
with multipart/form-data encoding for the file.
The request payload for the image MUST have Content-Disposition and Content-Type headers. The 'name' in the Content-Disposition header MUST be "avatar":
- Content-Disposition: form-data; name="avatar"; filename="whatever-you-want"
- Content-Type: mime/type
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
crop |
Optional - cropping coordinates, as a comma-separated string X1,Y1,X2,Y2 |
string |
None. |
Body Parameters
None.
Response Information
Resource Description
URL for the user's newly-saved avatar
PrimitiveName | Description | Type | Additional information |
---|---|---|---|
value |
value result |
string |
Required |
Response Formats
application/json, text/json
Sample:
{ "value": "sample string 1" }
application/xml, text/xml
Sample:
<Primitive xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.API.Models"> <value>sample string 1</value> </Primitive>