Skip to content

Commit

Permalink
修复项目安装后直接导入文件报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zmister committed Oct 26, 2021
1 parent dcb4fcb commit bcd7d38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MrDoc/settings.py
Expand Up @@ -193,6 +193,8 @@
# 媒体文件
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR,'media')
if os.path.exists(MEDIA_ROOT) is False:
os.mkdir(MEDIA_ROOT)

# 允许上传的图片后缀
ALLOWED_IMG = CONFIG.get("image_upload","suffix_name",fallback="jpg,jpeg,gif,png,bmp,webp").split(",")
Expand Down

0 comments on commit bcd7d38

Please sign in to comment.