I am using version 9.0 of JIRA. I want to upload pictures as user avatars using the rest API, but I have encountered some problems when program in nodejs。
1. according to the URL, the binary data of the picture is obtained from other places,
2. via /reset/api/2/
` http://IP:PORT/rest/api/latest/user/avatar/temporary?username=SomeOneUserName&filename=icon.png ` to upload the picture as temporary
3. create avatar according to temporary
4. set the user's Avatar as this Avatar
the step 3 is failed. and response status code is 500, but i cannot get detail info.
The code is as follows,
I have solved it,
1. step 1 download 48x48 size pictures directly
2. skip step 3, when uploading to the temporary with 48x48 size image, its reponse directly contains the avatar id. You can directly set the user's Avatar without going through the crop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.