미디어 타입

파일 유형에 대해 인터넷에서 사용하는 식별자

미디어 타입(media type), MIME 타입(MIME type), 콘텐츠 타입(content type)[1]인터넷에 전달되는 파일 포맷과 포맷 콘텐츠를 위한 2 부분의 식별자이다. IANA는 이러한 분류를 표준화하고 출판하는 공식 기관이다. 미디어 타입은 원래 1996년에 MIME 사양의 일부로서 이메일 메시지 콘텐츠와 첨부파일의 종류를 고지하기 위해 RFC 2045에 정의되었으며[2] 이를 근거로 MIME 타입이라는 이름이 만들어졌다. 미디어 타입은 또한 이와 비슷한 목적으로 HTTP[3]와 같은 다른 인터넷 프로토콜과 HTML[4]과 같은 문서 파일 포맷에 의해 사용된다.

명명 규칙 편집

미디어 타입은 유형(type), 아형(subtype), 그리고 선택적 매개변수로 이루어진다.

이를테면 HTML 파일은 text/html; charset=UTF-8로 지정된다. 이 예에서 text는 유형, html는 아형, charset=UTF-8문자 인코딩을 가리키는 선택적 매개변수이다.

미디어 타입은 최상위 유형 이름과 아형 이름으로 이루어지며, 이는 이른바 "트리"(tree)라는 구조로 구조화된다. 미디어 타입은 매개변수라는 데이터를 선택적으로 정의할 수 있다.

top-level type name / subtype name [ ; parameters ]

top-level type name / [ tree. ] subtype name [ +suffix ] [ ; parameters ]

현재 등록된 최상위 유형 이름은 다음과 같다: application, audio, example, font, image, message, model, multipart, text, video.

흔히 쓰이는 비공식적인 최상위 이름은 chemical이라 부른다.[5]

일반적인 예 편집

  • application/javascript
  • application/json
  • application/x-www-form-urlencoded
  • application/xml
  • application/zip
  • application/pdf
  • application/sql
  • application/graphql
  • application/ld+json
  • application/msword (.doc)
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document(.docx)
  • application/vnd.ms-excel (.xls)
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx)
  • application/vnd.ms-powerpoint (.ppt)
  • application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx)
  • application/vnd.oasis.opendocument.text (.odt)
  • audio/mpeg
  • audio/vorbis
  • multipart/form-data
  • text/css
  • text/html
  • text/csv
  • text/plain
  • image/png
  • image/jpeg
  • image/gif

각주 편집

  1. “Content-Type: text”. 《Exchange Server 2003 documentations》. Microsoft. 2004년 6월 8일. 2015년 12월 29일에 확인함. 
  2. Freed, N.; Borenstein, N. (November 1996). “Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies”. 국제 인터넷 표준화 기구. 2015년 7월 15일에 확인함. 
  3. “Hypertext Transfer Protocol -- HTTP/1.0”. May 1996. 2017년 2월 2일에 확인함. 
  4. “HTML 4.01 Specification”. 1999년 12월 24일. 2017년 2월 2일에 확인함. 
  5. Daniel Leidert, Egon Willighagen (2007). “The chemical-mime-data project”. 2016년 10월 8일에 원본 문서에서 보존된 문서. 2016년 4월 28일에 확인함. 

외부 링크 편집