Wiki source code of Encode Base64


Hide last authors
Nils Schweigert 7.1 1 {{version major="7" minor="2" patch="1" /}} This action is available from {{formcycle/}} version 7.2.1 onwards.
Nils Schweigert 1.1 2
Nils Schweigert 6.1 3 {{figure image="encodeBase64_en.png" width="400" clear="h1"}}
Nils Schweigert 1.2 4 Konfigurationsoberfläche der Aktion //Als Base64 kodieren//
Nils Schweigert 1.1 5 {{/figure}}
6
7
Nils Schweigert 5.1 8 The action //Encode as Base64// allows you to encode a given file into a Base64 string or a data URI.
Nils Schweigert 1.1 9
Nils Schweigert 1.2 10 == Paramerter ==
Nils Schweigert 1.1 11
Nils Schweigert 5.1 12 === Encoding settings ===
Nils Schweigert 1.1 13
Nils Schweigert 5.1 14 ; File
15 : The file to be encoded.
Nils Schweigert 1.1 16
Nils Schweigert 5.1 17 == Action variables ==
Nils Schweigert 1.1 18
Nils Schweigert 5.1 19 Actions of type //Encode as Base64// provide [[Action variables>>Formcycle.UserInterface.Variables||anchor="HActionvariables"]] which can be used in subsequent actions.
Nils Schweigert 1.1 20
21
Nils Schweigert 5.1 22 === Standard action variables ===
Nils Schweigert 1.1 23
Nils Schweigert 5.1 24 ; [%$<action name>.SUCCESS%]
25 : Return whether action was successfully executed. Returns Boolean (true/false).
26 ; [%$<action name>.RESULT%]
27 : Return all results provided by the action in structured form.
Nils Schweigert 1.1 28
Nils Schweigert 5.1 29 ; [%$<action name>.ERROR_CODE%]
30 : The error code thrown in case of an error in the action. Empty if no error occurred.
31 ; [%$<action name>.ERROR_MESSAGE%]
32 : The thrown error message in the action's error case. Empty if no error occurred.
Nils Schweigert 1.1 33
Nils Schweigert 5.1 34 === Action specific action variables ===
Nils Schweigert 1.1 35
Nils Schweigert 5.1 36 ; [%$<action name>.RESULT.base64Text%]
37 : The encoded Base64 string.
Nils Schweigert 1.2 38
Nils Schweigert 5.1 39 ; [%$<action name>.RESULT.base64DataUri%]
40 : The encoded data URI.
41
42 ; [%$<action name>.RESULT.mimeType%]
43 : The media type of the file that was encoded.