Skip to content

Start File Comment Attachment Upload Tier 3

POST/api/files/:id/comment-attachments/upload.multipartCopied!

Creates a file comment attachment upload and returns Presigned URLs for uploading its parts. Parts are generated in 100 MB chunks, and the maximum attachment size is 1 GB.

An upload that is not attached to a comment becomes eligible for automatic cleanup 24 hours after it is created.

For managed uploads, use the SDK commentAttachments.uploadForFile helper or the CLI youvico comment-attachment upload command. Both handle the full multipart workflow.

Managed CLI workflow

The CLI example runs the complete managed upload workflow instead of calling only this endpoint.

Example

ts
const upload = await client.commentAttachments.startForFile("FX1234567890ABCD", {
  name: "review-note.pdf",
  size: 1250000,
});
bash
youvico comment-attachment upload \
  --file FX1234567890ABCD \
  --path ./review-note.pdf
bash
curl -X POST 'https://api.youvico.com/api/files/FX1234567890ABCD/comment-attachments/upload.multipart' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "review-note.pdf", "size": 1250000 }'
json
{
  "data": {
    "id": "CA1234567890ABCD",
    "parts": [
      {
        "partNumber": 1,
        "url": "https://example.com/upload/1"
      }
    ]
  }
}

Request

Path

idstringrequired
File ID

Body

namestringrequired

1-255 characters

Attachment file name
sizenumberrequired

1-1000000000

Attachment size in bytes

Response

Returns 201 Created.

dataobject
Upload session
data.idstring
Created comment attachment ID

Example: CA1234567890ABCD

data.partsarray
Upload parts
data.parts[].partNumbernumber
Part number

Example: 1

data.parts[].urlstring
Presigned URL for uploading the part

Example: https://example.com/upload/1