Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving avatar for the native iOS app #1999

Closed
kormic opened this issue Jan 21, 2016 · 1 comment
Closed

Retrieving avatar for the native iOS app #1999

kormic opened this issue Jan 21, 2016 · 1 comment

Comments

@kormic
Copy link

kormic commented Jan 21, 2016

Hey! I m trying to get the avatars for the native iOS app. I see that the web app gets the username's url from the server and it sets the image by using that url. I m trying to implement this in the native app but it doesn't seem to work. I am a little bit confused so if someone could clear this up for me...

When I hit the url "https://demo[dot]rocket.chat/avatar/username" what actually happens? Does the server create a file and returns it? What format? SVG, PNG, JPG???

I guess this will be needed for the android app as well? Maybe if there would be a meteor method where we could retrieve each user's avatar? Is this doable?

Sorry for my noobness and thanks in advance.... 😃

@engelgabriel
Copy link
Member

For legacy reasons we added a .jpg on the URL for the request... regardless of the image format, so that CDNs and reverse proxies add IMAGE to the content type. I think we should fix that, and remove the .jpg and leave it without the extention and make sure we add the correct content type ourselves.

Right now.. its like this:
https://demo.rocket.chat/avatar/hubot.jpg
https://demo.rocket.chat/avatar/sing.li.jpg

And for an unknown image, the server will create a SVG on the fly:
https://demo.rocket.chat/avatar/QWERTYUIOP.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants