add a new cms ENV configuration to use a slow upload file handler to help test progress bars in uploads

This commit is contained in:
Chris Dodge
2013-05-29 13:21:31 -04:00
committed by David Baumgold
parent e6a84f84b2
commit b43f1c7331
3 changed files with 19 additions and 0 deletions

View File

@@ -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

7
cms/envs/debug_upload.py Normal file
View File

@@ -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',
)

View File

@@ -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 = {