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:
committed by
David Baumgold
parent
e6a84f84b2
commit
b43f1c7331
11
cms/djangoapps/contentstore/debug_file_uploader.py
Normal file
11
cms/djangoapps/contentstore/debug_file_uploader.py
Normal 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
7
cms/envs/debug_upload.py
Normal 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',
|
||||
)
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user