computingfacts / openhouse

The Food Culture
Apache License 2.0
0 stars 0 forks source link

Profile picture get request #3

Closed Nicholas-Robinson closed 7 years ago

Nicholas-Robinson commented 7 years ago

I would like to be able to request a profile picture in an img tag as follows

<img src="http://www.computingfacts.com/services/api/media/fetch/profile/photo/no-user"> Something like this (the "no-user" can be anything you like) will return the default profile avatar picture

<img src="http://www.computingfacts.com/services/api/media/fetch/profile/photo/d77497a8..."> This will return either the profile picture for the requested hash or the default if one is not set for that hash

I am also wondering if it would be at all possible to add dimensions to the request so that I can get a smaller or larger image depending on the requirements - little icon, or "view profile picture"

The reason for this is that I would like to get the logged in user profile picture (and I have their hash from the get user details) but I would also like to get the profile picture of others, to show some info on the author of the recipe for example.

Nicholas-Robinson commented 7 years ago

I tried to create an "endpoint" label, but I don't seem to have the ability to create labels ¯_(ツ)_/¯

computingfacts commented 7 years ago

This is the default no image endpoint http://localhost:8080/openhouse/api/media/fetch/no-user/photo Also, a user's profile photo can be requested using the userId http://localhost:8080/openhouse/api/media/fetch/photo?userId=27