Skip to content

createFile

Served by: file

Name Type
input CreateFileInput!

CreateFileResult

Creates a new file record linked to a supplier entity. Expects the server to return a file ID and a pre-signed upload URL.

mutation CreateFile($input: CreateFileInput!) {
createFile(input: $input) {
file {
contentType
createdAt
createdBy
data
dataTypeID
dataTypeSlug
deletedAt
deletedBy
description
id
name
publicAlias
publicURL
refid
reftype
size
tenantID
updatedAt
updatedBy
url
}
id
preSignedUploadUrl
}
}

Variables

{
"input": {
"contentType": "image/jpeg",
"name": "product-photo.jpg",
"refid": "<entity ID (e.g. supplier ID)>",
"reftype": "supplier",
"size": 204800
}
}