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

Chunked request body support #1001

Closed
zemelLeong opened this issue Apr 3, 2018 · 5 comments
Closed

Chunked request body support #1001

zemelLeong opened this issue Apr 3, 2018 · 5 comments

Comments

@zemelLeong
Copy link

zemelLeong commented Apr 3, 2018

django 2.0.2
channels 2.0.2
os: ubuntu
mode: debugger

Hi,
My project can receive large file upload, when using channels before. It will write a temporary file in the /tmp directory. But, when I use channels. Nothing in the /tmp directory. About transmit 12M will fail.
Could you tell me what is problem?

My settings.py config:
INSTALLED_APPS = [... , channels]
ASGI_APPLICATION = "myproject.routing.application"

I use javascript client test it can be connect success

@matthiask
Copy link
Contributor

Daphne/Channels do not support chunked request bodies yet.

Here's the relevant issue for Daphne: django/daphne#126

AsgiHandler / AsgiRequest in Channels do not handle chunked request bodies either (

# TODO: chunked bodies
)

This will probably not be easy to solve / fix.

@zemelLeong
Copy link
Author

It means that channels has blocked the file upload request, but it can't handle the file upload request. Is it?

@andrewgodwin
Copy link
Member

Channels will never write files into /tmp - it is meant to blocking-receive them from the client and pass them to the application in chunks, which can then proceed to stream that to disk if it wants (Django will do this). I'll move this into a chunked request body ticket.

@andrewgodwin andrewgodwin changed the title Using channels, upload large files will not be written to /tmp directory. Chunked request body support Apr 3, 2018
@hozblok
Copy link
Contributor

hozblok commented May 21, 2019

Currently related PR is #1251

@carltongibson
Copy link
Member

Going to close as _plain-old HTTP_™ should move to using Django's ASGIHandler — we'll be removing the Channels version.

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

No branches or pull requests

5 participants