Problems accessing uploaded files

upload

#1

Hello everyone,
some of my users are having trouble viewing images and attachments.
“The requested URL /uploads/default/XYZ/abcdefg.ext was not found on this server.” appears to be a common error message for both images and attachments, while some images show “The Image could not be loaded”.
Did anyone have similar experiences, or any idea what the reason behind this could be? o.O

-Adrian


(Jeff Atwood) #2

What version of Discourse are you on? Is it using our standard Docker based install?


#3

Sorry,forgot to include that. -_-
Our version is v1.3.0.beta9+57, which is currently up-to-date, however the
problem persists since quite a while.


(Jr.) #4

I’m having the same issue.

Version: v1.3.0.beta10 +34
Docker Install

I’ve never really tried it before, but had some users complaining that they weren’t able to access uploaded files.


(Jeff Atwood) #5

I believe we fixed a bug with this recently so update to very latest.


(Mittineague) #6

A port problem?

I noticed on my localhost that when I first inserted images they had relative src URLs.
After I ran sidekiq they were rendered as absolute links to the default 3000 port.
But with my VM the site is seen on port 4000 (port forwarding)

After going into Admin -> Settings -> Developer and with much trepidation after reading

DEVELOPER ONLY! WARNING! Use this HTTP port rather than the default of port 80. Leave blank for default of 80.

changed port 3000 to port 4000 the broken image link problem was solved


(Jr.) #7

Sweet.

Just upgraded and it works. Thanks for the super quick response.


(Kane York) #8

That means you were supposed to set it :stuck_out_tongue:

Once hidden site settings were added, that setting was set to “hidden everywhere except Rails.env == development”.


(Doron) #9

Hi,

I’m still having this problem. I’m running the latest version (upgraded a couple of days ago). I upload an image in a post and it looks fine, later when I reload the page the link is broken. Upon investigation, the link on the page is:
//discourse.mysite.com/uploads/default/original/1X/2f575f9d468ef77696ef0fd36405ae2b0d5f262e.jpg

Instead of:
//discourse.mysite.com:88/uploads/default/original/1X/2f575f9d468ef77696ef0fd36405ae2b0d5f262e.jpg

It’s missing the port. How can I fix it?

Thanks,
Doron


(Doron) #10

If found on another thread a statement that: “non-default ports are not supported”. Is this still true?
This is the simplest way to host multiple web servers and sites on the same host… Why make it so complicated to share the host?

The multisite configuration instructions are inhumane (the steps needed, not the docs themselves).
Setting an nginx proxy server seems like unnecessary trouble. Why not simply let me change the port?

Would it help if I place the images on S3?


(Jeff Atwood) #11

It is user hostile to put a website on a weird port. That is the main reason. It is only supported for development, not production sites.


(Doron) #12

You are thinking about public sites.
The user should not care what the used port is if it’s a private/internal site and the user gets there using a link. The user wont even notice the site uses a different port as he/she will never need to type the URL.

----://meta.discourse.org/t/problems-accessing-uploaded-files/28819/9

Is this a less “hostile” URL? Do you think users care if the numbers are at the end or at the middle of the URL?

Anyway, provide a simple way for me to use my own web server (external to the docker container) or provide a simple way to run in multisite mode and then this hack wont be needed.


(Kane York) #13

What about this?