Unable to get browser avatar
micschwarz opened this issue · comments
Hey,
I'm want to get some browser images for a profile overview. I noticed that the sdk does fetch the image with the incorrect content type (it uses "application/json" instead of "image/png").
Additionally the doc says that sdk.avatars.getBrowser(...)
returns the image url, which is not correct. It returns the image content.
Personaly I think it might be better to return the url, but thats just me :)
@micschwarz thanks for reporting this issue. This does seems like a bug. The correct behavior should be something like this method: https://github.com/appwrite/sdk-for-js/blob/master/src/sdk.js#L905
I'll work on a fix in the coming days.
@micschwarz sorry for the slight delay 😉 a new version of the Web SDK has been released (v1.2) with the following updates:
- Updated code examples
- Added TypeScript support for optional parameters
- Fixed return type for getBrowser method