Shotstash
API referenceGraphQL referenceMutations

Complete Upload

Completes an upload after every part is stored and returns the file.

Completes an upload after every part is stored and returns the file.

Arguments

sessionId*ID!

Upload session id.

md5Checksum?String

MD5 of the whole file (hex), when not sent at initiate.

convertHeic?BooleanDeprecated

Ignored since HEIC originals are kept as uploaded and get a preview version; kept for one release so older clients keep working.

Deprecated

Ignored: HEIC originals are kept and get a preview version.

Returns

MediaFile!
  1. returns

An uploaded file. The original bytes never change; derived outputs are processed versions.

id*ID!

Unique id.

filename*String!

Stored file name.

originalName*String!

The name the file had when it was uploaded.

mimeType*String!

MIME type.

size*BigInt!

Size in bytes.

md5Checksum*String!

MD5 checksum of the bytes (hex).

thumbnailUrl?String

Thumbnail URL (/media/t/{id}?v={n}), null while the file has no thumbnail.

duplicateOf?ID

Set when the file was uploaded or copied although identical bytes were already in the project: the id of that original.

downloadUrl*String!

Download URL of the original (cookie session, attachment).

processedVersions*

Outputs derived from this file (HEIC preview, pipeline results), newest first.

previewUrl?String

URL (/media/p/{id}) of the image preview the viewer shows instead of the original (HEIC), null when the original is shown as is.

jobs*

Processing jobs on this file, newest first (at most 20).

currentJob?

The job a card shows: the newest unfinished job, else one that failed within 24 hours, else null.

folder*

The folder that holds the file.

uploadedBy*

Who uploaded the file.

project*

The project that holds the file.

trashedAt?DateTime

When the file was moved to the trash, null while live.

createdAt*DateTime!

When the file was uploaded.

mutation CompleteUpload($sessionId: ID!) {  completeUpload(sessionId: $sessionId) {    id    filename    originalName    mimeType    size    md5Checksum    thumbnailUrl    duplicateOf    processedVersions {      id      kind      kindLabel      mimeType      size      downloadUrl      createdAt    }    jobs {      id      kind      kindLabel      fileId      status      state      progress      attempts      outputVersion {        id        kind        kindLabel        mimeType        size        downloadUrl        createdAt      }    }  }}