Can't download files when clicking links (v1.4.4)
Since this is my first post, let me start by giving big kudos to the NodeBB developers. It's really great. Thank you.
But, we're having a strange problem with uploads that is presenting us from going live.
We are using the open source version of NodeBB 1.4.4 on an ubuntu server. The site is at https://community.troikatronix.com
We also have paid for a hosted version to use as a sandbox at http://troikatronix.nodebb.com
We can upload files to the ubuntu site successfully and the file links show up as expected. But if you click the links, you get this error:
"Not Found: You seem to have stumbled upon a page that does not exist. Return to the home page."
Yet, if you right-click the link and say "Open In New Window" it downloads fine. (Similarly, if you right click the link and say "Copy Link" and then paste that link into the browser, the file will download.) The link that shows up in the bottom of the browser window matches the link that appears if you say "Open in New Window."
Here's a test post that shows the behavior: https://community.troikatronix.com/topic/3114/yet-another-test-topic
Note that we do not have any value set for "upload_path" in the config.json file. But, the actual path used for uploads and downloads ends up being "/assets/uploads/files/..." (That's not the same path we see in our "sandbox" site, which is /uploads/files.) I tried setting "upload_path" to both "/public/files" and "/assets/uploads/files" to no avail, even after attempting to upload new files, etc.
Perhaps a related clue: the test file in the link above is a binary file with an extension of ".izz" (the file format for my software.) The file that actually downloads when you do the procedure above ends in ".bin" not ".izz" However, .zip file do show up as .zip files, so perhaps this is a mime-type issue..
If you have any advice please let us know. We'd love to launch our NodeBB forum in the next couple of days.
Thanks in Advance for your Expertise,
In v1.4.3 and v1.4.4 the file up- and download is broken. Images are working tho...
While uploading a .zip for example it somehow could not detect the correct MIME type and so a .zip becomes .undefined or a .izz file becomes .bin.
If you then want to download these files nodebb creates this kind of link:
Note the /api path. This results first in a 404 not found link but the location header is correct so a site reload lets you download the file.
Rolling back to v1.4.2 fixes all of that.
baris last edited by
This was reported and fixed https://github.com/NodeBB/NodeBB/issues/5483
Will be available in 1.4.5
Thanks for that information @baris. But, the downgrade to 1.4.2 has led to another problem: the administrator control panel is getting 404 errors and we can't use it at all own. How soon will 1.4.5 be ready? Or can we implement this fix now?
@baris unfortunately this only fixes the download problem. The upload problem with the wrong mime type still exists
baris last edited by
Are you referring to this issue https://github.com/NodeBB/NodeBB/issues/5484?
@baris oh yes, actually. Sorry did not notice that issue.
But there is no solution yet, right?
To @baris and All:
We found a solution to our upload/download problems as well as Control Panel problems we experienced when we downgraded from 1.4.4 to 1.4.2.
The NodeBB team suggested adding "AllowEncodedSlashes" into our Apache config. After doing this, all was well with v1.4.2
(For details on the Apache setting, see here: https://httpd.apache.org/docs/2.4/mod/core.html#allowencodedslashes)
We have not tried to work again with 1.4.5 since we've got things working and on our live site. We'll set up a sandbox where we can try 1.4.5 and report back.
Thank you NodeBB folks.
Glad to hear it @Mark-Coniglio ! Thank you for checking in