My images sit behind a protected API route/url (i.e requires secret Basic Authentication credentials). Is there any way to supply “Authorization” headers to the avatarCustomUrl field such that the Authenticated images are fetched properly.
Or maybe I could fetch my protected image separately with necessary credentials and then supply the Image blob to the Amity Client ?
You could possibly do something like this. Fetch the authenticated image separately, get a fileId for the image (by using the sdk method). Use this fileId to update the avatar of the user.
Is this a viable option?
The SDK uses the authorization header currently, so this might not be a viable option.
How do I generate a fieldId for my protected images ? I found this, but there aren’t any examples for Javascript. Could you please maybe provide me a working Web Javascript SDK example to upload image ?