Skip to main content

Upload Files

First you need to use createFiles query to get the file url, and then you have to upload your file to that url.

mutation {
createFiles(input: [{contentType: "application/zip", extension: "zip"}]) {
fields
mediaDownloadUrl
mediaId
mediaUrl
signedUrl
}
}

Our javascript client have a function to automatically create and upload the files for you. It takes an extra File object as an argument.

client.media.uploadFiles([{
contentType: "application/zip",
extension: "zip",
file: file
}])