Home Manual Reference Source Test Repository
public class | source

UploadTask

Extends:

src/index.js~APIFileTask → UploadTask

Uploads the message translations to the Smartling server.

Test:

Constructor Summary

Public Constructor
public

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

Initializes a new instance of the class.

Member Summary

Public Members
public get

Value indicating whether content in the file is authorized (available for translation) in all locales.

public set

authorize(value: boolean): *

Sets a value indicating whether content in the file is authorized (available for translation) in all locales.

public get

The URL of the callback called when the file is 100% published for a locale.

public set

callbackURL(value: URL): *

Sets the URL of the callback called when the file is 100% published for a locale.

public

The path to the message file.

public

The desired format for the download.

Method Summary

Public Methods
public

async run(): Promise

Uploads the original source content to the Smartling server.

Inherited Summary

From class FileTask
public static

Returns the file type corresponding to the specified file URI.

public

A value that uniquely identifies the file.

Public Constructors

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

Initializes a new instance of the class.

Override:

FileTask#constructor

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 get authorize: boolean source

Value indicating whether content in the file is authorized (available for translation) in all locales.

public set authorize(value: boolean): * source

Sets a value indicating whether content in the file is authorized (available for translation) in all locales.

public get callbackURL: URL source

The URL of the callback called when the file is 100% published for a locale.

public set callbackURL(value: URL): * source

Sets the URL of the callback called when the file is 100% published for a locale.

public file: string source

The path to the message file.

public fileType: string source

The desired format for the download.

Public Methods

public async run(): Promise source

Uploads the original source content to the Smartling server.

Return:

Promise

Completes when the source file has been uploaded.