Skip to main content
POST
/
deal-folder
/
files
/
{file}
/
replace
/
initiate
iOS — Initiate direct-to-S3 multipart upload to replace an existing slot
curl --request POST \
  --url http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/initiate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_name": "reel-v2.mp4",
  "file_size": 10215040,
  "file_mime_type": "video/mp4"
}
'
{
  "status": "success",
  "data": {
    "session_id": 512,
    "upload_id": "2~xyzABC987defGHI654jklMNO321pqrSTU0",
    "s3_key": "deal-folders/12/slot-1/v2/reel-v2.mp4",
    "parts": [
      {
        "part_number": 1,
        "presigned_url": "https://mogl-prod.s3.amazonaws.com/deal-folders/12/slot-1/v2/reel-v2.mp4?partNumber=1&uploadId=2~xyz...&X-Amz-Signature=..."
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.

Path Parameters

file
integer
required

DealFolderFile ID (slot ID).

Example:

5

Body

application/json
file_name
string
required

Original file name (max 500 chars).

Example:

"reel-v2.mp4"

file_size
integer
required

File size in bytes. Max 250 MB (262144000 bytes).

Example:

10215040

file_mime_type
string
required

MIME type of the file (max 255 chars).

Example:

"video/mp4"

Response

Replace-upload session created with presigned part URLs

status
string
Example:

"success"

data
object