RocketChat / RocketChat/Rocket.Chat
[BOUNTY $1,000] Can Not Upload Files Larger Than CDN or Proxy Single Request Limits without Chunking
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description
Since the change to send files via the REST API https://github.com/RocketChat/Rocket.Chat/pull/16617, RocketChat instances hosted behind a CDN can not upload files larger than the limit for a single request (100MB for Cloudflare)
Problem has been recognized in posts here: https://github.com/RocketChat/Rocket.Chat/pull/16617#issuecomment-591119408, https://forums.rocket.chat/t/file-uploads-are-super-slow-because-theyre-sent-in-many-small-post-requests-wtf/4600/24, and https://forums.rocket.chat/t/file-uploads-are-super-slow-because-theyre-sent-in-many-small-post-requests-wtf/4600/26
While the previous uploading library https://github.com/jalik/meteor-jalik-ufs#uploading-files had issues, it did chunk uploads. If the upload chunk size was configurable, rather than a single POST request it would fix this issue and allow administrators to tune the setup to their network.
Steps to reproduce
Host RocketChat instance behind Cloudflare, and upload a file over 100MB
Server Setup Information
Version of Rocket.Chat Server: 3.14.3
Operating System: Ubuntu
Deployment Method: Manual install
Number of Running Instances: 4
DB Replicaset Oplog: Enabled
NodeJS Version: v12.18.4
MongoDB Version: 4.0.25
Client Setup Information
Desktop App or Browser Version: Firefox version 100
Operating System: Any
Additional context
Relevant logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Rocket.Chat's REST API file-upload entry point and the current single-request path described in the issue. Reproduce the failure with a file over the CDN or proxy limit, then verify that uploads use configurable chunks and that files larger than 100MB succeed behind Cloudflare.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100