Upload Attachment
UploadAttachment uploads a file in bounded chunks. The first call carries the spec and returns an upload_id; later calls carry that upload_id. Uploads are bound to the authenticated user, expire after 30 minutes of inactivity, and do not survive a server restart.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/attachments:upload" \ -H "Content-Type: application/json" \ -d '{ "writeOffset": "string" }'{ "uploadId": "string", "committedSize": "string", "attachment": { "name": "string", "createTime": "2019-08-24T14:15:22Z", "filename": "string", "content": "string", "externalLink": "string", "type": "string", "size": "string", "memo": "string", "motionMedia": { "family": "MOTION_MEDIA_FAMILY_UNSPECIFIED", "role": "MOTION_MEDIA_ROLE_UNSPECIFIED", "groupId": "string", "presentationTimestampUs": "string", "hasEmbeddedVideo": true }, "mediaMetadata": { "width": 0, "height": 0, "photo": { "captureTime": { "localDateTime": "string", "utcOffset": "string" }, "location": { "latitude": 0.1, "longitude": 0.1, "altitudeMeters": 0.1 }, "sourceExifOrientation": 0, "cameraMake": "string", "cameraModel": "string", "lensModel": "string", "fNumber": 0.1, "exposureTimeSeconds": 0.1, "iso": 0, "focalLengthMm": 0.1 }, "video": { "durationSeconds": 0.1 } } }, "maxChunkSize": 0}