Beta

Start Upload (File)

POSThttps://api.youvico.com/api/files/:id/comment-attachments/upload.multipart
Rate Limit
Tier 3

Starts uploading an attachment for a file comment.

Note

  1. Split the file into 100,000,000-byte parts from the start. The last part holds whatever remains.
  2. Within 30 minutes, upload each part with a PUT to the url that has the same partNumber, and keep the ETag header of each response.
  3. Call Complete Upload with every partNumber and eTag.

Example

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 }'
{
  "data": {
    "id": "CA1234567890ABCD",
    "parts": [
      {
        "partNumber": 1,
        "url": "https://files.youvico.com/upload/eyJhbGciOiJFZERTQSIsImtpZCI6..."
      }
    ]
  }
}
Request
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
}'
Response201 Created
{
  "data": {
    "id": "CA1234567890ABCD",
    "parts": [
      {
        "partNumber": 1,
        "url": "https://files.youvico.com/upload/eyJhbGciOiJFZERTQSIsImtpZCI6..."
      }
    ]
  }
}

Request

Path

idstringrequired
File ID

Body

namestringrequired

1-255 characters

Attachment file name

Example: review-note.pdf

sizenumberrequired

Integer, 1-1000000000

Attachment size in bytes

Example: 1250000

Response

Returns 201 Created.

dataobject
Upload session
data.idstring
Created comment attachment ID

Example: CA1234567890ABCD

data.partsarray
Upload parts