finalizeFileUpload
Finalize a file upload by reading the actual size from object storage and persisting it on the File record. Call this after the client has successfully uploaded bytes to the pre-signed URL returned by createFile.
Served by: file
Arguments
Section titled “Arguments”| Name | Type |
|---|---|
id |
ID! |
Returns
Section titled “Returns”File!
Example
Section titled “Example”Reads the actual size of an uploaded file from object storage and stores it on the File record. Call it after the bytes were uploaded to the pre-signed URL that createFile returned.
mutation FinalizeFileUpload($id: ID!) { finalizeFileUpload(id: $id) { contentType createdAt createdBy data dataTypeID dataTypeSlug deletedAt deletedBy description id name publicAlias publicURL refid reftype size tenantID updatedAt updatedBy url }}Variables
{ "id": "<file ID>"}