Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 869 Bytes

File metadata and controls

25 lines (15 loc) · 869 Bytes

Encode File To Base64

Encode File To Base64

Overview

Encodes a file to a Base64 string. Reads the specified file in streaming 8 KB chunks and produces a Base64 encoded string representation, which is suitable for embedding binary data in text-based formats such as JSON or XML payloads.

Parameters

1. filePath (FILE)

  • Label: Select file to encode
  • Description: Path to the file that will be encoded.
  • Required: Yes
  • Default: None
  • Constraints: None

Output

Returns a STRING containing the Base64 encoded string representation of the file.

Exceptions

Throws BotCommandException when the file does not exist at the specified path, when an I/O error occurs while reading the file, or when an unexpected error occurs during encoding.