Skip to content

Commit f2caf2e

Browse files
Jianfeng Zengcopybara-github
authored andcommitted
fix: Add buffer to the write file option
PiperOrigin-RevId: 785546915
1 parent dfee06a commit f2caf2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/google/adk/cli/fast_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ async def builder_build(files: list[UploadFile]) -> bool:
856856
os.makedirs(agent_dir, exist_ok=True)
857857
file_path = os.path.join(agent_dir, filename)
858858

859-
with open(file_path, "w") as buffer:
859+
with open(file_path, "wb") as buffer:
860860
shutil.copyfileobj(file.file, buffer)
861861

862862
except Exception as e:

0 commit comments

Comments
 (0)