# Avatars are broken after migrating to minio

**URL:** https://meta.discourse.org/t/avatars-are-broken-after-migrating-to-minio/111888
**Category:** Bug
**Created:** [3월 18, 2019, 5:10오전 UTC](https://meta.discourse.org/t/avatars-are-broken-after-migrating-to-minio/111888 "2019-03-18T05:10:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zh99998](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zh99998/32/100179_2.png) [@zh99998](https://meta.discourse.org/u/zh99998)
#### Post date: [3월 18, 2019, 5:10오전 UTC](https://meta.discourse.org/t/avatars-are-broken-after-migrating-to-minio/111888/1 "2019-03-18T05:10:34Z")

</div>

after I migrating to minio, some uploads and avatars are broken.

```plaintext
Failed to process hijacked response correctly : undefined method `path' for nil:NilClass

/var/www/discourse/app/controllers/user_avatars_controller.rb:158:in `proxy_avatar'
/var/www/discourse/app/controllers/user_avatars_controller.rb:122:in `show_in_site'
/var/www/discourse/app/controllers/user_avatars_controller.rb:78:in `block (2 levels) in show'
/var/www/discourse/lib/hijack.rb:56:in `instance_eval'
/var/www/discourse/lib/hijack.rb:56:in `block in hijack'
/var/www/discourse/lib/scheduler/defer.rb:94:in `block in do_work'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.6/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:89:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:79:in `block (2 levels) in start_thread'

```

And I found this code:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/f/1f4953ae4105158d4b387d36a13852bb47d0ef9f.jpeg)

my minio is not deploy on another port, the reason is complex.  
comment out this line then it works.

I wonder why discourse is judge that. http/s not on 80/443 is definitely a valid url.

also maybe related to [https://meta.discourse.org/t/all-avatar-uploads-are-broken/64466](https://meta.discourse.org/t/all-avatar-uploads-are-broken/64466)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [3월 18, 2019, 6:18오전 UTC](https://meta.discourse.org/t/avatars-are-broken-after-migrating-to-minio/111888/2 "2019-03-18T06:18:38Z")

</div>

There are lots of networks who won’t allow users to receive TLS encapsulated traffic on non standard ports. Slapping a port number on the back of an HTTPS address isn’t a solution for other issues introduced upstream.
