upload
Returns a pre-signed URL for uploading a file to S3. The URL is short-lived and should be used immediately. After upload, a Lambda process virus-checks and processes the file.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
id | ID! | Yes | The base64 object API ID |
uploadType | UploadType! | Yes | Type of file being uploaded |
extension | String! | Yes | File extension (e.g. pdf, png, jpg) |
Return Type
UploadLink — contains a url field with the pre-signed S3 URL.
Example
query GetUploadUrl($id: ID!, $extension: String!) {
upload(id: $id, uploadType: TEMPLATE, extension: $extension) {
url
}
}
Use the returned URL to PUT the file directly to S3. See How to Upload Files for the full workflow.