Admin API/Files and media/Mutations
stagedUploadsCreate
mutationReturns a signed upload target per file (valid 1 hour). POST the file with the parameters, then pass resourceUrl as originalSource.
Returns StagedUploadsCreatePayload!
mutation StagedUploadsCreate($input: [StagedUploadInput!]!) {
stagedUploadsCreate(input: $input) {
stagedTargets {
resourceUrl
url
}
userErrors {
code
message
field
}
}
}
# Variables
{
"input": [
{
"filename": "",
"mimeType": "",
"resource": "COLLECTION_IMAGE"
}
]
}Arguments
- input[StagedUploadInput!]!required
Payload
- stagedTargets[StagedMediaUploadTarget!]!required
- userErrors[UserError!]!required