Converts a File to a Base64 data URI string Used for file uploads in settings UI
Use GetAvatarDisplayUrl.
Gets the display URL for an avatar based on user settings Priority: UserImageURL > UserImageIconClass > default
The MJUserEntity
Optional default URL if no avatar is set
The URL to display, or null if using an icon
Use GetAvatarIconClass.
Gets the icon class for an avatar if using icon mode
Validates if a string is a valid Base64 data URI
Validates if a string is a valid URL
OptionalauthHeaders: Record<string, string>Use SyncFromImageUrl.
Syncs the signed-in user's avatar from an image URL (typically from the auth provider profile).
Downloads the image, converts it to a Base64 data URI and saves it through UpdateMyAvatar,
then reloads user so it is clean and current.
the signed-in user's MJUserEntity; any other user is refused
URL to the image (can be from Microsoft Graph, Google, etc.)
OptionalauthHeaders: Record<string, string>Optional headers for authenticated requests (e.g., { 'Authorization': 'Bearer token' })
Promise
Sets the SIGNED-IN user's avatar through the server's self-service UpdateMyAvatar mutation.
Use this rather than saving the MJ: Users row: the mutation needs no Update permission on
MJ: Users, which locked-down deployments do not grant, and it writes only the two avatar
columns. The server validates the values and always acts on the caller's own row.
a base64 image data URI or an http(s) URL; null clears it
a Font Awesome class list; null clears it
Optionalprovider: IMetadataProvider | IEntityDataProviderthe GraphQL provider to call; defaults to the global provider
the server's outcome; never throws
Service for managing user avatar operations across the application.
NOTE: This service does NOT depend on any Explorer-specific packages to remain usable across different Angular applications. All auth provider logic should be handled by the calling code.