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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
DataA string with Base64 encoded data.Robin.String
Yes
File nameThe 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 pathPath to the folder where the decoded data file will be saved.Robin.FolderPathC:\doc\imgYes
OverwriteIf 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.BooleantrueNo
Results
ResultPath to the file with decoded data.Robin.FilePath

Special conditions of use

  1. 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".
  2. 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.
  3. If no file name extension is specified, you will get a file with no extension.
  4. 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".
  5. 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

  1. Move the "Decode from Base64" to the workspace.

  2. Set the parameters correctly. "Data" - a string in Base64, "File name" - a name with valid symbols without extension.

  3. Launch the robot.

Implementation

  1. Select a file to decode from Base64.

  2. Open "Base actions" action group.

  3. Move the "Decode from Base64" action to the workspace.

  4. Click on the action.

  5. Action setting:

    1. "File name" parameter. Set a file name with or without an extension.

    2. 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.

 


  • Нет меток