implement upload form functions

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-06-25 12:17:55 +07:00
parent 0bf01447f6
commit 5385b5ed67
6 changed files with 184 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
export const createStageUploads = /* GraphQL */ `
mutation stagedUploadsCreate($input: [StagedUploadInput!]!) {
stagedUploadsCreate(input: $input) {
stagedTargets {
url
resourceUrl
parameters {
name
value
}
}
}
}
`;
export const createFileMutation = /* GraphQL */ `
mutation fileCreate($files: [FileCreateInput!]!) {
fileCreate(files: $files) {
files {
fileStatus
... on MediaImage {
id
}
}
userErrors {
field
message
}
}
}
`;