Hierarchy

Constructors

Methods

  • Upload a file

    const fileContent = 'file data here'; // can also be of type ArrayBuffer, Buffer, Blob, File or any
    // automatic upload:
    const file = await client.files.upload({name: 'examplefile.jpg', mimeType: 'image/jpeg'}, fileContent);

    // manual with uploadUrl:
    const file2 = await client.files.upload({name: 'examplefile.jpg', mimeType: 'image/jpeg'});
    // then upload using the file.uploadUrl

    Parameters

    • fileInfo: ExternalFileInfo
    • OptionalfileContent: unknown
    • overwrite: boolean = false
    • waitUntilAcknowledged: boolean = false

    Returns Promise<FileInfo | FileUploadResponse>