반응형

# input file타입 확장자 제한하기

## 엑셀 파일 ( .xlsx)

  • <input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />

## 텍스트 파일 ( .txt)

  • <input type="file" accept="text/plain" />

## 이미지 파일 ( .png/ .jpg/ etc)

  • <input type="file" accept="image/*" />

## HTML 파일 ( .htm/ .html)

  • <input type="file" accept="text/html" />

## 비디오 파일 ( .avi/ .mpg/ .mpeg/ .mp4)

  • <input type="file" accept="video/*" />

## 오디오 파일 ( .mp3/ .wav/ etc)

  • <input type="file" accept="audio/*" />

## PDF 파일

  • <input type="file" accept=".pdf" />
반응형

+ Recent posts