mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-11 23:35:25 -05:00
fix: Prevent binary file data loss on storage failure
- Log at WARNING level instead of DEBUG - Fall back to storing data URI in content field for binary files if workspace storage fails, preventing permanent data loss
This commit is contained in:
@@ -238,7 +238,10 @@ async def store_sandbox_files(
|
||||
if result.startswith("workspace://"):
|
||||
workspace_ref = result
|
||||
except Exception as e:
|
||||
logger.debug(f"Failed to store file {file.name} to workspace: {e}")
|
||||
logger.warning(f"Failed to store file {file.name} to workspace: {e}")
|
||||
# For binary files, fall back to data URI to prevent data loss
|
||||
if not file.is_text:
|
||||
content_str = data_uri
|
||||
|
||||
outputs.append(
|
||||
SandboxFileOutput(
|
||||
|
||||
Reference in New Issue
Block a user