Decode from Base64 Version 1 (Python)
Action group: Base action Subgroup: General
Description
The action decodes the specified data string from Base64 to a file:
- The output is a returned file with decoded Base64 data Base.
- Base64 encoded code must be used for decoding.
- To decode, you must specify the path to the file and the name of the file where the decoded data will be located.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Data | A string with Base64 encoded data. | Robin.String | Yes | |
File name | The name of the file(with or without extension) that will contain the decoded data. To set the file extension, you put a dot after the name and specify the extension. | Robin.String | Yes | |
Folder path | Path to the folder where the decoded data file will be saved. | Robin.FolderPath | C:\doc\img | Yes |
Overwrite | If set to true, the file is overwritten if a file with the same name is published. If the value is "false", then if there is no file with the same name, the robot throws an error. | Robin.Boolean | true | No |
Results | ||||
Result | Path to the file with decoded data. | Robin.FilePath |
Special conditions of use
- If you specify invalid characters in the file name ( \ / : * ? " < > | + space), the robot will generate an error: "An invalid character has been entered in the file: \ / : * ? "< > | + space".
- If the file name includes an extension (put a period at the end of the name and write the extension), the result will be a file with the extension specified.
- If no file name extension is specified, you will get a file with no extension.
- Added option to overwrite a file: If the value of the parameter is "true", the file is overwritten if a file with the same name is submitted. If the value of the parameter is "false", then in case of saving a file with the same name, the robot generates an error: "A file with this name already exists".
- If the action fails to decode the data, an error will be given: "Failed to decode data".
Example of use
Task 1
Decode without the file extension.
Solution
Move the "Decode from Base64" to the workspace.
Set the parameters correctly. "Data" - a string in Base64, "File name" - a name with valid symbols without extension.
Launch the robot.
Implementation
Select a file to decode from Base64.
Open "Base actions" action group.
Move the "Decode from Base64" action to the workspace.
Click on the action.
Action setting:
"File name" parameter. Set a file name with or without an extension.
In the "Folder path" set the path to the file folder.
6. Click "Start" in the top panel to start the robot.
Result
The output of the action is the path to the file without the extension with decoded data.
Обзор
Инструменты контента