> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openapi.pluuug.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Presigned URL 발급

> S3 업로드용 presigned PUT URL을 발급합니다.

**사용 흐름:**
1. 이 API를 호출하여 presigned URL과 path를 발급받습니다.
2. 응답의 `url`로 파일을 직접 업로드합니다. (PUT 요청, Content-Type: 파일 MIME 타입, Body: 파일 바이너리)
3. 응답의 `path`를 의뢰 생성/수정 API의 `file_set[].file` 필드에 전달합니다.

**제약 사항:**
- 허용 확장자: pdf, doc, docx, xls, xlsx, ppt, pptx, hwp, jpg, jpeg, png, gif, zip
- presigned URL 유효 시간: 60초
- 파일당 1회 호출 필요



## OpenAPI

````yaml POST /v1/presigned
openapi: 3.1.0
info:
  title: pluuug openapi
  version: 1.0.0
  description: >-
    플러그에서 제공하는 REST API의 상세 내용을 확인하고 직접 테스트할 수 있는 인터페이스입니다.<br>이 문서를 통해 API의
    엔드포인트, 요청 및 응답 형식 등을 확인할 수 있습니다.
servers:
  - url: https://openapi.pluuug.com
security: []
paths:
  /v1/presigned:
    post:
      tags:
        - presigned
      summary: Presigned URL 발급
      description: >-
        S3 업로드용 presigned PUT URL을 발급합니다.


        **사용 흐름:**

        1. 이 API를 호출하여 presigned URL과 path를 발급받습니다.

        2. 응답의 `url`로 파일을 직접 업로드합니다. (PUT 요청, Content-Type: 파일 MIME 타입, Body: 파일
        바이너리)

        3. 응답의 `path`를 의뢰 생성/수정 API의 `file_set[].file` 필드에 전달합니다.


        **제약 사항:**

        - 허용 확장자: pdf, doc, docx, xls, xlsx, ppt, pptx, hwp, jpg, jpeg, png,
        gif, zip

        - presigned URL 유효 시간: 60초

        - 파일당 1회 호출 필요
      operationId: presigned_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenapiPresignedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OpenapiPresignedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OpenapiPresignedRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenapiPresigned'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenapiPresignedValidationError'
          description: ''
      security:
        - ApiKeyAuth: []
          Signature: []
components:
  schemas:
    OpenapiPresignedRequest:
      type: object
      properties:
        name:
          type: string
          writeOnly: true
          minLength: 1
          description: 파일명 (확장자 포함)
          maxLength: 512
      required:
        - name
    OpenapiPresigned:
      type: object
      properties:
        url:
          type: string
          format: uri
          readOnly: true
          description: S3 업로드용 presigned PUT URL
        path:
          type: string
          readOnly: true
          description: S3 object key (파일 등록 시 file 필드로 사용)
      required:
        - path
        - url
    OpenapiPresignedValidationError:
      type: object
      properties:
        nonField:
          type: array
          items:
            type: string
        name:
          type: array
          items:
            type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    Signature:
      type: apiKey
      in: header
      name: X-Signature
      description: |-
        HMAC-SHA256 방식으로 body를 secret key로 해싱하여 생성한 서명을 넣어야 합니다.
        서버는 X-API-Key와 대응되는 secret key로 서명을 검증합니다.

````