Error when upload file to Rocket Chat in subfolder
Your Rocket.Chat version: 0.28 (make sure you are running the latest)
Hi, I have some problem with Rocket Chat in subfolder
- I can chat via web but can't access via App on Mobile
- When I upload any file, it can't display with Image, text,.. and I can't download it too. Can you help me resolv them ?
This is error when i upload a photo.

What are your file upload settings?
I have same issue with images uploaded, please fix in next version.
My rocket.chat version: 0.29
Thank you very much!

Sorry @marceloschmidt ,
I have had a holiday recently so I can't reply to you.
I don't change any setting in Rocket Chat server. It is default setting.
I found it have some problem with link of file upload, it isn't behind subfolder.
I think it shoud be .../chat/file-upload/
Here is my setting:

This issue is file uploaded not run in sub directory like main page:


Please help me :(
@dangkiena3 using in a subdirectory is a very new addition, not many people are using it yet. So we're still working out the kinks. Bare with us
@geekgonecrazy many thank for reply. I'm still wait...
Same my issue, +1
Now version 0.31 still does not fix this issue :(
Version 0.32 still...
Now is 0.33 version, please help me
Yup, having the same problem.
Is there a way I could hack this temporarily by hard-coding my subfolder somewhere?
@SQUIDwarrior:
Why not temporarily "solve" the issue by creating a simple rewrite rule? It should be quite easy depending on what web server you're running.
[EDIT: Actually, forget my suggestion. It was just a thought and it could be done if you were really desperately needing it to at least momentarily work — until the issue is solved. I am fully aware that my suggestion is far from perfect or ideal.]
@k0nsl - No, that's a good workaround actually. I will give that a try! I totally didn't think of using a rewrite rule
[EDIT: Nope, that doesn't seem to work either. Guess I'll have to disable file uploads until this is fixed]
Still present with v0.34.
Im taking a stab at this..
@AlecTroemel awesome, all yours! 👍 Let us know how it goes. Feel free to open a PR if you need us to take a look at what you have. PR's are great for discussing in context of the code :smile:
same problem here :cry:
by changing https://github.com/AlecTroemel/Rocket.Chat/blob/develop/packages/rocketchat-message-attachments/client/messageAttachment.coffee#L11 to
return RocketChat.settings.get('Site_Url').replace(/\/$/, '') + url
rocketchat was able to find the image when being behind an nginx reverse proxy. However there is another (deeper) bug where it gives a 403 error on trying to get the image. this is because https://github.com/AlecTroemel/Rocket.Chat/blob/develop/lib/fileUpload.coffee#L16 is getting null for
Meteor._localStorage.getItem('Meteor.loginToken');
This value is needed to find an user and verify that they are able to see the image here https://github.com/AlecTroemel/Rocket.Chat/blob/develop/packages/rocketchat-file-upload/server/lib/requests.js#L30
This can be worked around by setting Administration --> File Upload --> Protect uploaded files to false... though anyone can go and see those images..