Loading docs/topics/http/file-uploads.txt +3 −3 Original line number Diff line number Diff line Loading @@ -229,7 +229,7 @@ For instance, suppose you've written a ``ProgressBarUploadHandler`` that provides feedback on upload progress to some sort of AJAX widget. You'd add this handler to your upload handlers like this:: request.upload_handlers.insert(0, ProgressBarUploadHandler()) request.upload_handlers.insert(0, ProgressBarUploadHandler(request)) You'd probably want to use ``list.insert()`` in this case (instead of ``append()``) because a progress bar handler would need to run *before* any Loading @@ -238,7 +238,7 @@ other handlers. Remember, the upload handlers are processed in order. If you want to replace the upload handlers completely, you can just assign a new list:: request.upload_handlers = [ProgressBarUploadHandler()] request.upload_handlers = [ProgressBarUploadHandler(request)] .. note:: Loading Loading @@ -266,7 +266,7 @@ list:: @csrf_exempt def upload_file_view(request): request.upload_handlers.insert(0, ProgressBarUploadHandler()) request.upload_handlers.insert(0, ProgressBarUploadHandler(request)) return _upload_file_view(request) @csrf_protect Loading Loading
docs/topics/http/file-uploads.txt +3 −3 Original line number Diff line number Diff line Loading @@ -229,7 +229,7 @@ For instance, suppose you've written a ``ProgressBarUploadHandler`` that provides feedback on upload progress to some sort of AJAX widget. You'd add this handler to your upload handlers like this:: request.upload_handlers.insert(0, ProgressBarUploadHandler()) request.upload_handlers.insert(0, ProgressBarUploadHandler(request)) You'd probably want to use ``list.insert()`` in this case (instead of ``append()``) because a progress bar handler would need to run *before* any Loading @@ -238,7 +238,7 @@ other handlers. Remember, the upload handlers are processed in order. If you want to replace the upload handlers completely, you can just assign a new list:: request.upload_handlers = [ProgressBarUploadHandler()] request.upload_handlers = [ProgressBarUploadHandler(request)] .. note:: Loading Loading @@ -266,7 +266,7 @@ list:: @csrf_exempt def upload_file_view(request): request.upload_handlers.insert(0, ProgressBarUploadHandler()) request.upload_handlers.insert(0, ProgressBarUploadHandler(request)) return _upload_file_view(request) @csrf_protect Loading