Multipart Document Upload
Objective
This operation is designed for uploading large files (500MB or more) using a multipart (chunked) upload process. Multipart uploads improve reliability, performance, and allow resumability by splitting a large file into smaller parts.
The multipart upload process involves the following steps:
-
Initiate the Multipart Upload: call the
initiateDataRoomDocumentMultiPartUpload
mutation to start the upload session. This:- Calculates how the file will be divided into multiple parts
- Returns an upload object with a unique upload.id
-
Generate Pre-signed URLs for Chunks: use the
generatePresignedUrlsForDataRoomDocumentMultiPartUpload
mutation to request secure pre-signed URLs for specific part numbers using the upload.id. These URLs allow the client to upload each file chunk directly to storage. -
Upload Each Chunk: perform HTTP PUT requests to the returned pre-signed URLs, uploading each chunk of the file. Each part must be uploaded using its corresponding URL.
-
Complete the Multipart Upload: after all parts have been successfully uploaded, finalize the upload session by calling the
completeDataRoomDocumentMultiPartUpload
mutation. This assembles the uploaded parts and initiates post-processing (e.g., virus scanning, indexing). -
Track Upload Status: clients should poll the
dataRoomDocumentUpload
query to monitor the upload's progress and processing status. This query provides:- The current
DocumentTransferStatus
(e.g.,PENDING
,PROCESSING
,COMPLETED
,FAILED
) - Timestamps for various stages
- A reference to the resulting document (if available)
- Continue polling until the upload reaches a terminal state:
COMPLETED
– The document is processed and available in the DataRoom.FAILED
– The upload or processing encountered an error.
- The current
Initiate Multipart Document Upload
Initiates a multipart upload for a large document. This mutation starts the upload session and calculates how the file will be split into multiple parts (chunks), preparing it for chunked uploading to storage.
This operation require the DataRoom-scoped token.
mutation InitMultipartUpload {
initiateDataRoomDocumentMultiPartUpload(
input: { dataRoomId: "RGF0YVJvb206NjczOTQ=", fileName: "test.pdf", fileSize: 104857600 }
) {
totalParts
upload {
id
status
createdAt
updatedAt
expiresAt
failureReason
}
}
}
Generate Presigned Urls
Generates pre-signed URLs for uploading specific parts of a document in a multipart upload session. This allows clients to upload large files in smaller chunks, improving reliability, performance, and resumability of uploads.
This operation require the DataRoom-scoped token.
mutation GeneratePresignedUrls {
generatePresignedUrlsForDataRoomDocumentMultiPartUpload(
input: {
id: "RGF0YVJvb21Eb2N1bWVudFVwbG9hZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDA="
partNumbers: { from: 1, count: 20 }
}
) {
uploadPresignedUrls {
partNumber
presignedUrl
}
}
}
Get Document Upload Status
Retrieves the status and details of a document upload request by its unique ID. This is used to track progress through the upload pipeline — from initiation to processing completion.
This operation require the DataRoom-scoped token.
query GetUploadStatus {
dataRoomDocumentUpload(
id: "RGF0YVJvb21Eb2N1bWVudFVwbG9hZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDA="
) {
id
status
updatedAt
expiresAt
createdAt
failureReason
}
}