임포트/업로드 가능 확장자 설정

editor.import.extensions는 2.8.0 버전부터 지원이 필요합니다.

임포트 및 업로드에 허용되는 파일 확장자를 구성합니다.

임포트

// Pre-2.18.0 default
'editor.import.extensions': ['docx', 'doc', 'hwp', 'hml', 'html', 'htm', 'txt', 'xls', 'xlsx', 'odt']

// 2.18.0+ default
'editor.import.extensions': ['docx', 'doc', 'hwp', 'hwpx', 'hml', 'html', 'htm', 'txt', 'xls', 'xlsx', 'odt']

// 3.0.0+ default
'editor.import.extensions': ['docx', 'doc', 'hwp', 'hwpx', 'hml', 'html', 'htm', 'txt', 'xls', 'xlsx', 'odt', 'ppt', 'pptx']

// Example
'editor.import.extensions': ['docx', 'hwpx', 'xlsx', 'pptx']

이미지 업로드

// default
'editor.upload.image.extensions': ['jpg', 'gif', 'png', 'jpeg']

// example
'editor.upload.image.extensions': ['jpg', 'png']

비디오 업로드

// default
'editor.upload.video.extensions': ['mp4', 'ogg', 'webm']

// example
'editor.upload.video.extensions': ['mp4']

일반 파일 업로드

보안 참고

  • 문서 형식 (doc, docx, ppt, pptx, xls, xlsx, pdf, rtf, odt, ods, odp, hwp, hwpx, 등) — 매크로 / 스크립트가 포함될 수 있습니다. 임포트 용도로만 사용할 것을 권장합니다.
  • 마크업 / 스타일링 (xml, css, svg, textile, html) — XSS / 스크립트 인젝션 위험이 있습니다.
  • 실행 파일 / 임베디드 (swf, eof) — 직접 실행될 수 있어 안전하지 않을 수 있습니다.
// Pre-3.2.2509 default (extensive list)
'editor.upload.file.extensions': [
  'bmp', 'css', 'csv', 'diff', 'doc',
  'docx', 'eof', 'gif', 'jpeg', 'jpg',
  'json', 'mp3', 'mp4', 'm4a', 'odp',
  'ods', 'odt', 'ogg', 'otf', 'patch',
  'pdf', 'png', 'ppt', 'pptx', 'rtf',
  'svg', 'swf', 'textile', 'tif', 'tiff',
  'ttf', 'txt', 'wav', 'webm', 'woff',
  'xls', 'xlsx', 'xml', 'md', 'vtt',
  'hwp', 'hml', 'html'
]

// 3.2.2509 / 2.20.2509+ default (restricted, safer)
'editor.upload.file.extensions': [
  'bmp', 'gif', 'jpeg', 'jpg', 'png', 'tif', 'tiff', 'webp',
  'mp3', 'mp4', 'm4a', 'ogg', 'wav', 'webm',
  'txt'
]

관련 정보