Skip to content
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

Error when a file is uploaded by a Livechat visitor #292

Closed
renatobecker opened this issue Aug 1, 2020 · 5 comments
Closed

Error when a file is uploaded by a Livechat visitor #292

renatobecker opened this issue Aug 1, 2020 · 5 comments

Comments

@renatobecker
Copy link
Contributor

When a livechat end-user(visitor) uploads a file the following error is raised:

Screen Shot 2020-08-01 at 20 23 12

I took a look at the code and I guess I found the reason for the error:
https://github.com/RocketChat/Rocket.Chat/blob/develop/app/apps/server/converters/uploads.js#L56

Instead of:
const result = this.orch.getConverters().get('users').convertByToken(upload.visitorToken);

it should be:
const result = this.orch.getConverters().get('visitor').convertByToken(upload.visitorToken);

@d-gubert
Copy link
Member

d-gubert commented Aug 3, 2020

Can you confirm that applying this change solves your problem?

@renatobecker
Copy link
Contributor Author

Can you confirm that applying this change solves your problem?

Yeah, we applied the suggested changes locally and everything worked fine.

@d-gubert
Copy link
Member

d-gubert commented Aug 3, 2020

Right, so would you like us to open the PR with those changes? Or would you rather do it, since you already have it applied?

@renatobecker
Copy link
Contributor Author

Right, so would you like us to open the PR with those changes? Or would you rather do it, since you already have it applied?

I can handle it, no worries.
Thanks.

@renatobecker
Copy link
Contributor Author

Closing in favor of: RocketChat/Rocket.Chat#18474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants