Skip to content

Function: uploadToStorage() ​

ts
function uploadToStorage(
   ticket, 
   file, 
   opts?
): Promise<void>;

Sends file to the presigned URL of ticket as the request body, with the ticket's headers. The URL is signed for the size the document was created with, so file must be that file.

Parameters ​

ticket ​

documentId ​

string

upload ​

{ expiresAt: Date; headers: z.ZodRecord<z.ZodString, z.ZodString>; method: "PUT"; url: string; }

upload.expiresAt ​

Date

upload.headers ​

z.ZodRecord<z.ZodString, z.ZodString>

upload.method ​

"PUT"

upload.url ​

string

file ​

Blob

opts? ​

UploadOptions = {}

Returns ​

Promise<void>

Released under the Apache-2.0 License.