Upload files + main thread

Hi! I’m new to django. I have a question: django is a synchronous framework. Is the main thread blocked when the client sends a file to the server?

This is hard to directly answer - the thread serving a request is blocked during any time it acts on a request

However, most WSGI servers that Django will run inside are multi-threaded or multi-process, so it’s not really a big concern to block one thread. Additionally, file uploads are generally handled by that server and then streamed to Django in chunks, so it’s not like Django is the thing sitting there reading every uploaded byte.

1 Like

Thank you very much!!