I'm doing file uploads using Django's File Upload mechanism with a custom handler (by subclassing django.core.files.uploadhandler.FileUploadHandler
) which does some additional processing in the
receive_data_chunk(self, raw_data, start)
function.
I was curious when the handler is actually called (i.e. after the file has been completely uploaded by the server or as it arrives on the socket)?
From my tests I found out that you have access to the data as it arrives on the socket, but I would like someone to confirm this. I'm a little puzzled by this, because I thought mod_wsgi
was a content generator
in Apache, thus being called after the input filters
which pre-process the client's request.
PS: I'm using Apache + mod_wsgi + Django.