Start Upload (File)
POST
https://api.youvico.com/api/files/:id/comment-attachments/upload.multipart- Rate Limit
- Tier 3
- Scope
- comments:write
- Project Role
- OwnerManagerMemberReviewerRestricted Reviewer
Starts uploading an attachment for a file comment.
Note
- Split the file into 100,000,000-byte parts from the start. The last part holds whatever remains.
- Within 30 minutes, upload each part with a PUT to the
urlthat has the samepartNumber, and keep theETagheader of each response. - Call Complete Upload with every
partNumberandeTag.
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
idstringrequiredFile ID
Body
namestringrequired1-255 characters
Attachment file name
Example: review-note.pdf
sizenumberrequiredInteger, 1-1000000000
Attachment size in bytes
Example: 1250000
Response
Returns 201 Created.
dataobjectUpload session
data.idstringCreated comment attachment ID
Example: CA1234567890ABCD
data.partsarrayUpload parts