Copy
mutation StagedFileUploadCreate($input: StagedFileUploadInput!) {
stagedFileUploadCreate(input: $input) {
stagedFileUpload {
signedUploadUrl
signedUploadUrlExpiryDate
file {
createdAt
filename
formattedSize
id
mimeType
size
staged
updatedAt
... on Document {
url
}
... on Image {
url
}
... on Media {
url
}
}
}
userErrors {
code
field
message
}
}
}
Copy
{
"data": {
"stagedFileUploadCreate": {
"stagedFileUpload": {
"signedUploadUrl": "https://example.com",
"signedUploadUrlExpiryDate": "2025-01-15T10:30:00Z",
"file": {
"createdAt": "2025-01-15T10:30:00Z",
"filename": "document.pdf",
"formattedSize": "example-formatted-size",
"id": "gid://ownright/FileRecord/1",
"mimeType": "DOCUMENT_DOC",
"size": 1024,
"staged": true,
"updatedAt": "2025-01-15T10:30:00Z",
"url": "https://example.com"
}
},
"userErrors": []
}
}
}
Mutation field
stagedFileUploadCreate
Arguments
Return fields
The newly created staged file upload.
Show properties
Show properties
The file that is staged for upload.
Show properties
Show properties
The date the file was created.
The name of the file.
The size of the file in a human-readable format.
The GID of the file record.
The MIME type of the file.
The size of the file in bytes.
Whether the file is staged for upload or not.
The date the file was last updated.
A signed upload URL to use when uploading file.
Date when upload URL expires.
Types
Copy
enum FileMimeType {
DOCUMENT_DOC # Represents the `application/msword` MIME type.
DOCUMENT_DOCX # Represents the `application/vnd.openxmlformats-officedocument.wordprocessingml.documents` MIME type.
DOCUMENT_PDF # Represents the `application/pdf` MIME type.
IMAGE_HEIC # Represents the `image/heic` MIME type.
IMAGE_JPEG # Represents the `image/jpeg` MIME type.
IMAGE_PNG # Represents the `image/png` MIME type.
IMAGE_TIFF # Represents the `image/tiff` MIME type.
}
enum StagedFileUploadCreateUserErrorCode {
INVALID_FILENAME # The supplied filename is invalid.
}
scalar FileRecordGID # A global identifier for a FileRecord object in format of 'gid://ownright/FileRecord/ID'.
scalar ISO8601DateTime # An ISO 8601-encoded datetime
scalar Url # A valid URL, transported as a string.