I've found a reason for why I couldn't get it working and a solution
as well.
It would appear that Django uses lazy evaluation for request.FILES to
determine when the upload handler is called. Therefore, the upload
handler is only evoked when and if you attempt to access
request.FILES. Additional
Hi all,
I want to stop any file uploads that don't end in my designated
extension as soon as they're received. To do this, I define a custom
Upload Handler and write new_file to look something like this:
def new_file(self, field_name, file_name, content_type,
content_length, charset=None):
2 matches
Mail list logo