Skip to content

Commit 9641120

Browse files
committed
update seek
1 parent 3d6bbbe commit 9641120

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

backend/app/admin/api/v1/sys/plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ async def update_plugin_status(plugin: Annotated[str, Query(description='插件
9393
)
9494
async def build_plugin(plugin: Annotated[str, Path(description='插件名称')]) -> StreamingResponse:
9595
bio = await plugin_service.build(plugin=plugin)
96-
bio.seek(0)
9796
return StreamingResponse(
9897
bio,
9998
media_type='application/x-zip-compressed',

backend/app/admin/service/plugin_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ async def build(*, plugin: str) -> io.BytesIO:
184184
arcname = os.path.relpath(file_path, start=plugin_dir)
185185
zf.write(file_path, arcname)
186186

187+
bio.seek(0)
187188
return bio
188189

189190

0 commit comments

Comments
 (0)