Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

file

A JSON object with the reference to the uploaded file, the parser configuration for content extraction and more. Please see a full list of properties here: Pushing content - "files" property . The file must be uploaded using media/upload to obtain a token, see example below.

Example:

Code Block
 "file": {
        "token": "{{uploadedFile}}",
        "name": "software-strings.xlsx",
        "formatId": 137,
        "stringKeyPattern": "string-{seq}"
    }

object, Mandatory

push

An optional JSON object that defines how file content is updated to the Flex container. If not specified then no updating will be done. See specifications further down.

Example:

Code Block
"push": {
    "enabled": true,
    "mode": "SourceAndNewTranslations"
}

bool, Optional

callback

Specify a URL which will be called upon success or failure of operation. This makes polling for operation status unnecessary. See Callbacks (with asynchronous operations)

object, Optional

...

enabled

Specifies if content shall be synchronized into the Flex container or not.

bool, Mandatory

isPreviewMode

Optional boolean, default is false. If true then the system simulates the update and returns all the details but it will not actually update the Flex container.

bool, Optional

syncToFlexModemode

Optional, default is SourceAndNewTranslations

This field specifies how content is synchronized from the uploaded file to the Flex container. In many scenarios you want to sync source text changes from the file to Flex and translation changes from Flex back into the file.

The options are:

  • SourceAndNewTranslations: Sync source texts as well as translations from the file. Translations are only transferred from the file to Flex, if there is no translation yet. (Recommended mode)

  • SourceOnly: Sync source text changes only. Never transfer translations from the file to Flex (only the other way round).

  • SourceAndTranslation: Copy all content from the file to Flex. Typically this would be used when uploading content the very first time to Flex.

string, Optional

...