Skip to content
Back

[SOLVED] Avatars.getInitiale()

  • 0
  • Avatars
Shivam
11 Jan, 2025, 16:22

In python, avatars.getInitiale() return Byte and not a URL. Now how should I store it into the collection? I have two options two store it, one is String other is URL and I don't know what to do with this Byte. How to convert it into a String or a URL whichever you prefer.

TL;DR
Developers initially queried about using Avatars.getInitials() method in their app but then got a satisfactory solution. The suggestion was to set the profile picture to null in the database and determine in the app if it's null to use Avatars or the Coil library. The URL format for obtaining initials was also shared. Finally, a query about storing the Byte returned by avatars.getInitials() in a collection was asked, and the developer wanted to know how to convert it into a String or URL for storage.
Kenny
11 Jan, 2025, 16:41

This is the URL format for getting the initials

https://cloud.appwrite.io/v1/avatars/initials?name={FIRSTNAME LASTNAME}&width=80&height=80

Kenny
11 Jan, 2025, 16:41

but again, I don't really think there is any problem calling this when needed its a very small request tbh

Shivam
11 Jan, 2025, 16:46

So you are saying that I should set profile to null in database and check in app weather it is null or not. If it is null then use Avatars else use Coil library??

Kenny
11 Jan, 2025, 16:47

I have no idea what coil library is or any context of your app, but if you're using the intials as a profile picture I don't see any harm in not saving the picture at all.

Shivam
11 Jan, 2025, 16:50

No problem, your provided link works great. Now I will handle it easily, whichever will be easy.

Shivam
11 Jan, 2025, 16:51

[SOLVED] Avatars.getInitiale()

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more