Add proper file storage settings
This commit is contained in:
@@ -119,3 +119,16 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads')
|
||||
|
||||
MEDIA_URL = '/uploads/'
|
||||
|
||||
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.TemporaryFileUploadHandler']
|
||||
|
||||
FILE_UPLOAD_MAX_MEMORY_SIZE = 2147483648 # 2GB
|
||||
|
||||
FILE_UPLOAD_TEMP_DIR = os.path.join(BASE_DIR, 'tmp') # probably default /tmp is too small for video files
|
||||
|
||||
|
||||
Reference in New Issue
Block a user