gitlabhq/gitlabhq — pull request #5281 by Popl7 (2013-10-06 19:24:26+00:00)
Title: avatar upload on profile page

hello GitLabHQ,

with these changes it is possible to upload an image to use as avatar.
The upload uses the attachment_uploader and it has a maximum of 200KB.
The avatar is shown instead of the gravatar when it is available.
It can be uploaded on the profile page.

There is a spec test for the helper and a feature test for the uploading of the avatar.

Issues related to uploading avatars are:
118: Allow upload of avatar if one is not using gravatar (closed)
There also is a feature request on feedback.gitlab.com

Currently it is not possible to remove the avatar; only re-upload it.
When an avatar file with more than 200KB is uploaded an error prevents saving the profile but no message is shown.

Please let me know it this is build in an acceptable way.
This is my first contribution so any tips or help are welcome.

Regards,
Steven

Screenshot of the profile page showing both the upload field as the uploaded avatar:

![screen shot 2013-10-06 at 21 18 02](https://f.cloud.github.com/assets/4224518/1277324/103f9604-2ebc-11e3-877f-8c7adfda41f3.png)