Home Manual Reference Source Test Repository
public class | source

FileTask

Extends:

src/index.js~API → FileTask

Direct Subclass:

DownloadTask, UploadTask

Provides the base implementation for file-based tasks.

Test:

Static Method Summary

Static Public Methods
public static

Returns the file type corresponding to the specified file URI.

Constructor Summary

Public Constructor
public

constructor(apiKey: string, projectId: string, fileURI: string)

Initializes a new instance of the class.

Member Summary

Public Members
public

A value that uniquely identifies the file.

Static Public Methods

public static getFileTypeFromURI(fileURI: string): string source

Returns the file type corresponding to the specified file URI.

Params:

NameTypeAttributeDescription
fileURI string

The file URI.

Return:

string

The file type corresponding to the specified file URI, or an empty string if the type is unknown.

Test:

Public Constructors

public constructor(apiKey: string, projectId: string, fileURI: string) source

Initializes a new instance of the class.

Params:

NameTypeAttributeDescription
apiKey string
  • optional

The API key to authenticate all requests.

projectId string
  • optional

The project identifier.

fileURI string
  • optional

A value that uniquely identifies the file.

Public Members

public fileURI: string source

A value that uniquely identifies the file.