mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 04:14:27 -04:00
Change avatar via rsapi
This commit is contained in:
parent
c570aae9f7
commit
d64daa7d49
1 changed files with 10 additions and 3 deletions
|
@ -44,16 +44,23 @@ Item
|
||||||
{
|
{
|
||||||
console.log("Result file changed! " , resultFile)
|
console.log("Result file changed! " , resultFile)
|
||||||
newAvatar.source = 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
|
Image
|
||||||
{
|
{
|
||||||
id: newAvatar
|
id: newAvatar
|
||||||
height: colorHash.height
|
height: topFace.height
|
||||||
width: colorHash.height
|
width: topFace.height
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue