2

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.

1 Answer 1

0

In Apache, input filters are only applied to input content when the request handler reads the input content. So, no preprocessing is done by input filters, it is done inline with the request handler consuming the input content.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.