---
title: "파일 업로드"
method: POST
path: "/files"
tags: ["USER API"]
---

# 파일 업로드

`POST /files`

문서 파일이나 요청자 첨부파일을 API로 요청하기 위한 사전 파일 업로드용 API입니다.

**요청 형식:**
- Content-Type: multipart/form-data
- Stream을 통해 업로드 후 API에서 활용 가능한 파일 정보를 반환합니다.

**파일 크기 제한:**
- type=attachment: 최대 10MB
- type=document: PDF 파일은 최대 10MB, 그 외 확장자는 최대 5MB

**기타 정보:**
- 유효기간: 2시간
- 문서 파일 업로드 시 PDF 파일을 권장합니다.

## Query parameters

- `type` 'document' | 'attachment', required

## Response `201`

업로드 된 파일 정보

- UploadFileResponseDto
  - `fileId` string, required — 파일 ID
  - `token` string, required — 파일 토큰(유효시간: 2시간)
  - `url` string, required — 파일 다운로드 URL

## Other responses

- `400`

---

[API](https://skmtc.net/modusign/apis/modusign-api.md) · [All operations](https://skmtc.net/modusign/apis/modusign-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/modusign/modusign-api/versions/5772e872cbf9/schema)
