Skip to content

Commit 8002016

Browse files
authored
Pass input-data encoded as base64 (#114)
cli: pass input data b64 encoded
1 parent 042475a commit 8002016

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tasks/func.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from base64 import b64encode
12
from os import makedirs, listdir
23
from os.path import join, exists, splitext
34
from shutil import rmtree
@@ -111,7 +112,9 @@ def invoke(ctx, user, func, input_data=None, mpi=None, graph=False):
111112
}
112113

113114
if input_data:
114-
data["input_data"] = input_data
115+
data["input_data"] = b64encode(input_data.encode("utf-8")).decode(
116+
"utf-8"
117+
)
115118

116119
if mpi is not None:
117120
data["mpi_world_size"] = int(mpi)

0 commit comments

Comments
 (0)