Skip to content

Commit

Permalink
Add seek(0) to request data to prevent issues on retries (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
Metamess authored May 23, 2024
1 parent ac38bf3 commit 1c68cd8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gcsfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ async def _request(
self, method, path, *args, headers=None, json=None, data=None, **kwargs
):
await self._set_session()
if hasattr(data, "seek"):
data.seek(0)
async with self.session.request(
method=method,
url=self._format_path(path, args),
Expand Down

0 comments on commit 1c68cd8

Please sign in to comment.