Change avatar via rsapi

This commit is contained in:
Angela Mazzurco 2017-07-18 16:25:38 +02:00
parent c570aae9f7
commit d64daa7d49

View File

@ -44,16 +44,23 @@ Item
{
console.log("Result file changed! " , resultFile)
newAvatar.source = resultFile
}
var base64Image = androidImagePicker.imageToBase64(resultFile)
rsApi.request("/identity/set_avatar", {"gxs_id": cntDt.md.gxs_id, "avatar": base64Image },
function (res){
console.log("Avatar changed! " , JSON.stringify(res))
}
)
}
}
}
Image
{
id: newAvatar
height: colorHash.height
width: colorHash.height
height: topFace.height
width: topFace.height
fillMode: Image.PreserveAspectFit
}