# Uploading user selectable avatars fails unless allow\_uploaded\_avatars is enabled

**URL:** https://meta.discourse.org/t/uploading-user-selectable-avatars-fails-unless-allow-uploaded-avatars-is-enabled/103261
**Category:** Bug
**Created:** [December 1, 2018, 8:36pm UTC](https://meta.discourse.org/t/uploading-user-selectable-avatars-fails-unless-allow-uploaded-avatars-is-enabled/103261 "2018-12-01T20:36:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [December 1, 2018, 8:36pm UTC](https://meta.discourse.org/t/uploading-user-selectable-avatars-fails-unless-allow-uploaded-avatars-is-enabled/103261/1 "2018-12-01T20:36:39Z")

</div>

If the allow\_uploaded\_avatars Site Setting is not enabled, attempting to upload an image to the selectable\_avatars list fails. The message in the upload modal is ‘Uploading 100%’, but no image appears.

The copy for the allow\_uploaded\_avatars setting is ‘Allow users to upload custom profile pictures.’ Having to enable this when you don’t want to allow users to upload avatar images is counter intuitive.

It is failing here: [https://github.com/discourse/discourse/blob/master/app/controllers/uploads\_controller.rb#L16](https://github.com/discourse/discourse/blob/master/app/controllers/uploads_controller.rb#L16). Adding a condition to that line that checks for `!params[:for_site_setting] == "true"` would allow avatars to be uploaded regardless of the Site Settings.

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [December 5, 2018, 1:52pm UTC](https://meta.discourse.org/t/uploading-user-selectable-avatars-fails-unless-allow-uploaded-avatars-is-enabled/103261/3 "2018-12-05T13:52:20Z")

</div>

Fixed by:

[https://github.com/discourse/discourse/pull/6728](https://github.com/discourse/discourse/pull/6728)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 6, 2018, 12:33am UTC](https://meta.discourse.org/t/uploading-user-selectable-avatars-fails-unless-allow-uploaded-avatars-is-enabled/103261/4 "2018-12-06T00:33:41Z")

</div>

Can you verify this looks good @simon and close if so?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [December 6, 2018, 12:52am UTC](https://meta.discourse.org/t/uploading-user-selectable-avatars-fails-unless-allow-uploaded-avatars-is-enabled/103261/5 "2018-12-06T00:52:16Z")

</div>


