Skip to content

Commit

Permalink
Add seek(0) to request data to prevent issues on retries
Browse files Browse the repository at this point in the history
  • Loading branch information
Metamess committed May 23, 2024
1 parent ac38bf3 commit 545e1a3
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 545e1a3

Please sign in to comment.