diff --git a/actions/file/save_file_from_base64.py b/actions/file/save_file_from_base64.py index 8668f64..634b95f 100644 --- a/actions/file/save_file_from_base64.py +++ b/actions/file/save_file_from_base64.py @@ -37,9 +37,10 @@ def save_file_from_base64( try: # Decodifica o Base64 # file_bytes = base64.b64decode(base64_content) - file_bytes = base64.b64decode( + clean_base64_content = base64.b64decode( base64_content.strip().replace("\n", "").replace("\r", "") ) + file_bytes = base64.b64decode(clean_base64_content) # Grava o arquivo em disco with open(file_path, "wb") as f: