Prepare File Upload (Company)
On this page
GraphQL endpoint: /company
Prepares a file upload by returning a presigned PUT URL together with the file key to save. Upload the file to the URL, then pass the file key to the mutation that records it.
Query
mutation (
$fileName: String!
$contentType: String!
) {
prepareFileUpload (
fileName: $fileName
contentType: $contentType
) {
uploadUrl
fileKey
}
}
Variables
{
"contentType": "image/png",
"fileName": "logo.png"
}
Response
{
"data": {
"prepareFileUpload": {
"fileKey": "user_uploads/2026-01-15_examplekey1_logo.png",
"uploadUrl": "http://localhost:4566/tnid-v2-uploads-local/user_uploads/2026-01-15_examplekey1_logo.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=900&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000"
}
}
}