Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FilesAPI

Hierarchy

Index

Methods

aggregate

delete

getDownloadUrls

list

retrieve

search

update

upload

  • 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/jpg'}, fileContent);
    
    // manual with uploadUrl:
    const file2 = await client.files.upload({name: 'examplefile.jpg', mimeType: 'image/jpg'});
    // then upload using the file.uploadUrl

    Parameters

    • fileInfo: ExternalFileInfo
    • Optional fileContent: FileContent
    • Default value overwrite: boolean = false
    • Default value waitUntilAcknowledged: boolean = false

    Returns Promise<FileUploadResponse | FileInfo>