New Features
Upload avatar
In this contribution I focused about possibility to upload own avatar. Users have now possibility to add their avatar, this avatar is displaying in their profile and also as their thumbnail in the events which their participated or will be participate. Image is saving on the server and in database is stored information about localization. We dont want to store a full image, because it required a lot of space, so we create a thumbnail from photo, thumbanils is much smaller but quality i very good. User can also update his avatar, after update his old photo is deleted.
screenshot from swagger with this method:
Implementation
pull request:
commit connected wit this contribution
Implementation contain :
- creating new service: ImageService, witch has couple of methods, main methods is responsible for take a photo as stream. Then is checking if photo has correct format, I decided also to check a EXIF orientation parameter, because photos made by Samsung Galaxy are often rotated, and if I will save it in original way, they will be displaying in application incorrectly. The rest of the methods are responsible for read image size, resizing, delete old photos and validate image format
- methods in profileService witch are responsible for update particular user information about path to his avatar,
- method in ProfileController to get avatar by Put method and return the path to user avatar.
Links related to this contribution
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
Is this feature already available on the Android App?
https://github.com/stramek/FoodShare
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @eastmael, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @piach I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @piach! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit