-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] file upload broken when running in subdirectory https://github.com… #7395
[FIX] file upload broken when running in subdirectory https://github.com… #7395
Conversation
In other places in the code we tend to make use of the Meteor.absoluteUrl() to fix this. Should we try and make use of this? That way the user only has to properly set their ROOT_URL and everything will work properly regardless of subfolder |
hi @geekgonecrazy, thanks for the feedback. we cannot make use of Meteor.absoluteUrl() here because incoming request objects url attribute is a relative URL and the webapp.handler method is making a decision about whether to handle the request or not based on that attribute a separate but related issue was that ROOT_URL is not being properly set in the Set_SiteUrl callback, which will result in inconsistent behavior from the Meteor.absoluteUrl() method |
@geekgonecrazy @rodrigok would you kindly review the changes? Idealy I'd like to have this in the next bugfix release. This should also resolve a lot of issues with folks using a reverse proxy setup running in a subdir |
Applied this patch to current version - 0.57.2, and it doesn't work. |
@simnv i think you just dont have your root_url set. I dont see how that change would fix things as Meteor.bindenvironment just makes meteor variables accessible within that scope: it still doesnt change the fact that the /file-upload/ path is missing root_url for its pattern matching |
…running-in-subdir-6679 [FIX] file upload broken when running in subdirectory https://github.com…
@ryoshimizu Tried with the new version, result is the same. I do have ROOT_URL set: |
@simnv , in a browser console, what are your values for |
@Darkneon, it's different for rocketchat electron application and for rocketchat in browser. |
…//issues/6679
@RocketChat/core
Closes #6679
File upload using jalik:ufs was broken due to the following reasons: