We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b81bbd commit 54e146dCopy full SHA for 54e146d
1 file changed
ml/main.py
@@ -30,7 +30,9 @@ def process(payload: dict):
30
minio_object = payload.get("minio_object")
31
record_id = payload.get("record_id")
32
33
- ext = minio_object.rsplit(".", 1)[-1]
+ ext = str(minio_object).rsplit(".", 1)[-1].lower()
34
+ if not (1 <= len(ext) <= 10 and ext.isalnum()):
35
+ ext = "bin"
36
with tempfile.NamedTemporaryFile(suffix=f".{ext}", delete=False) as tmp:
37
tmp_path = tmp.name
38
0 commit comments