...
Code Block | ||
---|---|---|
| ||
// 사이냅에디터 설정 객체
var SynapEditorConfig = {
...
'editor.upload.image.param': {
'csrfmiddlewaretoken': '{{ csrf_token }}'
},
'editor.upload.image.api': '업로드 API',
...
} |
1) 업로드 경로 설정
Code Block | ||
---|---|---|
| ||
# 프로젝트 settings.py ... MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') ... # 프로젝트 urls.py urlpatterns = [ ... ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
...