Cognite JavaScript SDK > Files

Class: Files

Hierarchy

Files

Index

Methods


Methods

<Static> delete

delete(fileIds: number[]): Promise<FileDeleteResponse>

Defined in Files.ts:167

Parameters:

Name Type
fileIds number[]

Returns: Promise<FileDeleteResponse>


<Static> download

download(fileId: number): Promise<string>

Defined in Files.ts:127

Parameters:

Name Type
fileId number

Returns: Promise<string>


<Static> list

list(params?: FileListParams): Promise<FileMetadataWithCursor>

Defined in Files.ts:174

Parameters:

Name Type
Optional params FileListParams

Returns: Promise<FileMetadataWithCursor>


<Static> replaceMetadata

replaceMetadata(files: File[]): Promise<void>

Defined in Files.ts:194

Parameters:

Name Type
files File[]

Returns: Promise<void>


<Static> retrieveMetadata

retrieveMetadata(fileId: number): Promise<File>

Defined in Files.ts:133

Parameters:

Name Type
fileId number

Returns: Promise<File>


<Static> retrieveMultipleMetadata

retrieveMultipleMetadata(fileIds: number[]): Promise<File[]>

Defined in Files.ts:139

Parameters:

Name Type
fileIds number[]

Returns: Promise<File[]>


search(params: FileSearchParams): Promise<FileMetadataWithCursor>

Defined in Files.ts:184

Parameters:

Name Type
params FileSearchParams

Returns: Promise<FileMetadataWithCursor>


<Static> updateMetadata

updateMetadata(fileId: number, changes: object): Promise<File>

Defined in Files.ts:150

Parameters:

Name Type
fileId number
changes object

Returns: Promise<File>


<Static> updateMultipleMetadata

updateMultipleMetadata(changes: object): Promise<void>

Defined in Files.ts:161

Parameters:

Name Type
changes object

Returns: Promise<void>


<Static> upload

upload(file: Partial<File>, params?: FileUploadParams): Promise<FileUploadResponse>

Defined in Files.ts:92

Parameters:

Name Type Default value
file Partial<File> -
Default value params FileUploadParams {}

Returns: Promise<FileUploadResponse>