juliomalegria / django-chunked-upload

Upload large files to Django in multiple chunks, with the ability to resume if the upload is interrupted.
MIT No Attribution
218 stars 73 forks source link

when I upload large file(200M),return 400 status, but I cannot log error #57

Closed freedomDR closed 4 years ago

freedomDR commented 4 years ago
class LoggingException(object):

    def __init__(self, get_response):
        print('__init__')
        self.get_response = get_response

    def __call__(self, request):
        print('--process_request--')
        response = self.get_response(request)
        print('--process_reponse--')
        print(dir(response))
        return response

    def process_exception(self, request, exception):
        print(request)
        print("logging exception")
        print(exception)
MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'myadmin.loggingException.LoggingException',
]

when I upload large file(200M),return 400 status, but I cannot log error

freedomDR commented 4 years ago

I sloved it