Glowb Dev Docs
SaaS API콘텐츠 검수

POST /ai/influence/contents/{applicationId}/final-submission/explanations/upload-url

소명 첨부 업로드 URL 발급 (크리에이터)

소명 첨부 업로드 URL 발급 (크리에이터)

초대 화면 캡처 등을 올릴 GCS Resumable 업로드용 서명 URL을 발급합니다. 본인 신청 건만 발급됩니다.

서버는 파일 바이트를 받지 않습니다. 브라우저가 GCS로 직접 올리고, 서버에는 완료된 URL만 전달합니다.

HTTP 요청

POST /ai/influence/contents/{applicationId}/final-submission/explanations/upload-url
Authorization: Bearer {access_token}
Content-Type: application/json

Request Body

{ "filename": "invite.png", "contentType": "image/png" }
필드타입필수설명
filenamestring아니오원본 파일명. 비면 upload 로 저장됩니다
contentTypestring예업로드할 파일의 MIME 타입

허용 Content-Type

image/*, video/* 와 압축 형식(application/zip, application/x-tar, application/gzip, application/vnd.rar, application/x-7z-compressed)입니다. 그 외는 거부됩니다.

응답

{
  "status": 200,
  "message": "발급 완료",
  "data": {
    "uploadUrl": "https://storage.googleapis.com/glowb-input/...&X-Goog-Signature=...",
    "publicUrl": "https://storage.googleapis.com/glowb-input/campaign/content/{memberId}/{applicationId}/1787047080_invite.png"
  }
}

업로드 절차

  1. 이 API로 uploadUrl 을 받습니다
  2. uploadUrl 로 POST — 헤더에 x-goog-resumable: start 와 발급 때 보낸 것과 동일한 Content-Type
  3. 응답 Location 헤더(세션 URI)로 파일 바이트를 PUT (끊기면 Range 로 재개)
  4. 완료 후 publicUrl 을 소명 등록의 attachments 에 담아 보냅니다

2단계의 Content-Type 이 발급 때 보낸 값과 다르면 GCS가 403 SignatureDoesNotMatch 로 거부합니다. 서명에 포함되는 값이라 반드시 같아야 합니다.

서명 URL 유효기간은 30분입니다.

저장 위치

gs://glowb-input/campaign/content/{크리에이터 memberId}/{applicationId}/{timestamp}_{filename}

클린본·최종본 등 크리에이터의 다른 제출 파일과 같은 자리입니다. 소명 첨부만 다른 스토리지로 갈라지지 않게 맞췄습니다.

에러 응답

상태 코드설명
400본인 신청 건이 아님 / 신청 건 없음 / Content-Type 누락
401인증 실패
—지원하지 않는 파일 형식 (UNSUPPORTED_FILE_FORMAT)

API 테스트

On this page