-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
When deploying a Reflex app behind Cloudflare (with HTTPS enabled), the rx.upload(progress=True) component does not show the progress bar until the entire file upload is complete. The handle_upload() function on the backend is not triggered until the full body is received, which delays the start of the progress bar by 10β20 seconds for large files.
This behavior does not occur when the app is run locally (without a reverse proxy), where the progress bar appears immediately and tracks the upload in real time.
To Reproduce
Deploy a Reflex app using rx.upload(progress=True) behind NGINX and Cloudflare (proxy enabled).
Upload a large file (10MB+).
Observe the delayed appearance of the progress bar.
Check DevTools: the /_upload request shows Request Sent duration = 10β20s, with Waiting (TTFB) only starting after the file is fully uploaded.
- Code/Link to Repo:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
https://github.com/user-attachments/assets/6a7c1b01-ac73-4ac3-9cf0-137a77ca9878
Specifics (please complete the following information):
- Python Version: 3.12
- Reflex Version: 0.7.13
- OS: Amazon Linux
- Browser (Optional): Chrome
Additional context
Add any other context about the problem here.