---
updatedAt: 2026-04-22T09:48:12.000Z
agentTools:
  projectIndex: https://developers.modusign.co.kr/llms.txt
---

# 파일 업로드

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

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

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

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

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/files": {
      "post": {
        "description": "문서 파일이나 요청자 첨부파일을 API로 요청하기 위한 사전 파일 업로드용 API입니다.\n\n**요청 형식:**\n- Content-Type: multipart/form-data\n- Stream을 통해 업로드 후 API에서 활용 가능한 파일 정보를 반환합니다.\n\n**파일 크기 제한:**\n- type=attachment: 최대 10MB\n- type=document: PDF 파일은 최대 10MB, 그 외 확장자는 최대 5MB\n\n**기타 정보:**\n- 유효기간: 2시간\n- 문서 파일 업로드 시 PDF 파일을 권장합니다.",
        "operationId": "FileController_uploadFile",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "description": "파일 유형",
            "schema": {
              "example": "document",
              "type": "string",
              "enum": [
                "document",
                "attachment"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadFileRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "업로드 된 파일 정보",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadFileResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "File count limit is exceeded",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "BadRequestException"
                    },
                    "title": {
                      "type": "string",
                      "example": "File count limit is exceeded"
                    },
                    "instance": {
                      "type": "string",
                      "example": "/attachments/upload"
                    },
                    "message": {
                      "type": "string",
                      "example": "File count limit is exceeded"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Basic": []
          },
          {
            "Bearer": []
          }
        ],
        "summary": "파일 업로드",
        "tags": [
          "USER API"
        ]
      }
    }
  },
  "info": {
    "title": "MODUSIGN API",
    "description": "",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.modusign.co.kr",
      "description": "production"
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "Basic": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "UploadFileRequestDto": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "업로드할 파일 (attachment: 최대 10MB, document: PDF 최대 10MB/기타 확장자 최대 5MB)"
          }
        },
        "required": [
          "file"
        ]
      },
      "UploadFileResponseDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "파일 ID"
          },
          "token": {
            "type": "string",
            "description": "파일 토큰(유효시간: 2시간)"
          },
          "url": {
            "type": "string",
            "description": "파일 다운로드 URL"
          }
        },
        "required": [
          "fileId",
          "token",
          "url"
        ]
      }
    }
  }
}
```