История страницы
...
Encode in Base64
...
Version 1 (Python)
Группа действий: Базовые действия Подгруппа Общее
Описание
Действие кодирует данные указанного файла в Base64
...
Action group: Base actions Subgroup: General
...
Description
The action encodes the data in the specified file in Base64.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Data type | The type of data to be encoded. List elements: File, String Тип данных, которые будут кодироваться. Элементы списка: Файл, Строка. | Robin.String | Даyes | |
FileПуть к файлу, данные которого будут кодироваться | Path to file whose data will be encoded. | Robin.PathToFile | Нетno | |
StringСтрока | , которая будет кодироватьсяString to be encoded. | Robin.String | Нетno | |
Results | ||||
---|---|---|---|---|
Result | Строка с кодированными даннымиEncoded string. | Robin.String |
Особые условия использования
- Для кодирования пользователю необходимо указать тип данных для кодировки: файл или строку.
- Если пользователь выбрал тип данных, но не указал выбранный тип (файл/строка), то действие отобразит ошибку: "Некорректно заполнены входные параметры".
- Результатом действия является строка с кодированными данными.
- Существует ограничение на размер файла - 10МБ. При указании файла большего размера действие выдает ошибку в виде сообщения: «Размер файла больше допустимого».
Примеры использования
Задача 1
Необходимо закодировать данные, передаваемые во входном файле в Base64.
Решение
- Установить действие "Кодировать в Base64" на рабочую область.
- Корректно заполнить параметры. "Тип данных" - Файл,
- Запустить робота.
Реализация
...
Special conditions of use
- To encode the user needs to specify the data type for encoding: file or string.
- If the user selected a data type, but did not specify the selected type (file/string), the action will display the error: "Input parameters are not filled correctly".
- The result of the action is a string with encoded data.
- There is a limitation on file size - 10MB. If you specify a larger file size, the action will generate an error in the form of a message: "The file size is larger than allowed".
Examples of use
Task 1
Encode the data passed in the input file in Base64.
Solution
- Move the "Encode in Base64" action to the workspace.
- Set the parameters correctly. "Data type" - File.
- Start the robot.
Implementation
- Select the file to encode in Base64.
- Open the "Base actions" action group.
- Move the "Encode in Base64" action to the workspace.
- Click on the action.
- Action setting:
- "Data type" parameter. Select "File" from the dropdown list.
- In the"File" field specify the path to the file folder.
- Click "Start" in the top panel to start the robot.
Result
The output of the action was a string with Base64 encoded data.
Task 2
- If parameters are set incorrectly, for example, if the data type is "String", the "String" field should be left blank.
2. Start the robot.
Result
The action encoded the specified string and returned a string with encoded data. The action did not touch the specified file.
Task 3
Repeat the case by specifying "Data type" - File. As a result, the action will not touch the specified string
...
Результат
Действие выдало результат в виде строки с кодированными в Base64 данными.
Задача 2
- При некорректном задании параметров, например при типе данных "Строка" поле "Строка" оставить незаполненным.
2. Запустить робота.
Результат
Действие кодировало указанную строку и вернуло строку с кодированными данными. Указанный файл действие не трогало.
Задача 3
Повторить кейс, указав "Тип данных" - Файл. В результате действие не будет трогать указанную строку.