Avatar visualization error

Jordan Radushev shared this problem 2 years ago
Defect Fixed

Hi,

I have the following problem:


I am trying to upload an avatar through Yellowfin REST API (YF version is 9.7.1) and it works just fine, in terms that it returns status code 200. I also use the admin user (admin@yellwofin.com.au) to authenticate through the API.

However, once I receive 200 by uploading the avatar, my avatar changes like the screenshot below:

895855a2ac0e1f4485400d950c1999cd

Here is the request I send to the API:


POST - /api/users/userID/avatar


Here are the logs as well:

YF:2022-04-20 09:04:22.780: WARN (MIImageAction) - [110] [73FC8DF4] [/MIAvatarImage.i4] Session does not have access to image 120217

Thanks in advance!

Replies (4)

photo
1

Hi Jordan,

Thanks for contacting Yellowfin with your query.

Are you also logging in with the same account used to upload the avatar? What happens if you log out and back in to the Yellowfin UI or even restart Yellowfin, does the avatar display correctly?

Kind regards,

Chris

photo
1

Hi Chris,

Thanks for the quick reply. I'm working with Jordan on the topic.

We've tried changing the avatar image of both the same and a different user than the one used to authenticate to the REST API. Same result - we don't get the picture displayed and see the "Session does not have access to image" error message.

I know that Yellowfin stores everything in its database, so I tried to find the images table. I think it is "reportimageitem". When we upload a new avatar via the REST API, we've got a new entry in this table, one for the "primary" image and some other records for the avatar resized to different resolutions.

We've also tried to upload an image using the Yellowfin UI and see what happens in the database. Following are two records: https://docs.google.com/spreadsheets/d/1RDrGj_GXkdC0uudTRf5u9luJM3q-SbOtsJx8GcGtUnY/edit?usp=sharing


Restarting YF is not really an option for us going forward, as we'd need for the API integration to work without someone restarting the app.


Let me know if you need any more information.

Best,

Ivan

photo
1

Hi Ivan,

Thanks for coming back to me.

I'm wondering if there's some undocumented limitations on the file - filetype, dimensions etc that are causing problems when uploading via the REST API.

When you uploaded via the UI, did that work properly? If so, try that same image using the REST API, rather than a different one.

According to our dev wiki, https://developers.yellowfinbi.com/dev/api-docs/current/#operation/updateUserAvatar it seems to say that you can only update your own avatar but I'm guessing you want to use this to update other avatars.

I could double check this with our lead dev next week (he's been away this week) and maybe see if I can get some clarification.

Kind regards,

Chris

photo
1

Hi Chris,

Thanks for your quick response.


What I try to achieve is the ability to change each user's avatar. Probably, there are some limitations on the image file I try to upload. I continue receiving HTTP status 200 after the avatar upload, and still the avatar is not displayed properly in the UI.


Kind regards,

Jordan

photo
1

Hi Jordan,

Are you using each user's corresponding credentials when trying to update the avatar or the admin credentials? If the latter, we might have to raise this as an enhancement, as it seems the intended behaviour is only to allow a user to change their own avatar. If you'd like to get on a call to run through it, let me know.

Kind regards,

Chris

photo
1

Hey Chris,

We've tried both. We're using the admin credentials. We changed the admin's profile avatar and other user's avatar as well. The result is the same.

I think jumping on a call would be very helpful for us.

Best,

Ivan

photo
1

Hi Ivan,

Are you available for a call tomorrow? Either late morning or early afternoon (UTC/GMT)

Kind regards,

Chris

photo
1

Early afternoon sounds good.

Best,

Ivan

photo
1

Hi Ivan,

Sure thing, I've put in a meeting for 1pm.


______________________________________________________________________________


Microsoft Teams meeting


Join on your computer or mobile app

Click here to join the meeting

Learn more | Meeting options


Kind regards,

Chris

photo
1

Hi Ivan,

Thanks for running through this with me last week. Just a quick update to say that I'm still awaiting some feedback from the dev team.

In the meantime are you able to send over the code you're using to invoke this API call?

Kind regards,

Chris

photo
1

Hi Chris,

Here's a link to the code that I'm using: https://gist.github.com/Bo0mer/99cfd8e7d6270db4a4ae4758b5c56193

Let me know if you need any help with running it.

Best,

Ivan

photo
1

Hi Ivan,

Thanks very much. I'm also running in to the same error, so I've written up a bug report for the dev team to investigate. Hopefully we can get to the bottom of this soon! If I receive any more updates, I'll let you know in this ticket.

Kind regards,

Chris

photo
1

Hi Chris,

Any updates on this topic? Do you have an ETA when this fix will be released?

Thanks,

Ivan

photo
1

Hi Ivan,

No word yet on this particular issue, however I've raised the priority with the developer team and requested they provide an update. As soon as they respond, I'll come back to you.

Kind regards,

Chris

photo
photo
1

Hi Jordan,

I can confirm that the fix for this particular issue was included in 9.9!

When possible, please upgrade at your earliest convenience. I'll close this ticket off as it's been resolved with the update, but please let me know if you're still having issues post-upgrade with this particular problem.

Kind regards,

Chris

Leave a Comment
 
Attach a file