diff --git a/cms/djangoapps/contentstore/debug_file_uploader.py b/cms/djangoapps/contentstore/debug_file_uploader.py new file mode 100644 index 0000000000..aa82b87821 --- /dev/null +++ b/cms/djangoapps/contentstore/debug_file_uploader.py @@ -0,0 +1,11 @@ +from django.core.files.uploadhandler import FileUploadHandler +import time + + +class DebugFileUploader(FileUploadHandler): + def receive_data_chunk(self, raw_data, start): + time.sleep(1) + return raw_data + + def file_complete(self, file_size): + return None diff --git a/cms/envs/debug_upload.py b/cms/envs/debug_upload.py new file mode 100644 index 0000000000..683871a530 --- /dev/null +++ b/cms/envs/debug_upload.py @@ -0,0 +1,7 @@ +from .dev import * + +FILE_UPLOAD_HANDLERS = ( + 'contentstore.debug_file_uploader.DebugFileUploader', + 'django.core.files.uploadhandler.MemoryFileUploadHandler', + 'django.core.files.uploadhandler.TemporaryFileUploadHandler', +) diff --git a/cms/envs/dev.py b/cms/envs/dev.py index 655092b74b..4f8174ac2b 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -36,6 +36,7 @@ MODULESTORE = { } } + # cdodge: This is the specifier for the MongoDB (using GridFS) backed static content store # This is for static content for courseware, not system static content (e.g. javascript, css, edX branding, etc) CONTENTSTORE = {