diff --git a/s3fs/core.py b/s3fs/core.py index 24dbffc0..f3dc411d 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -1141,9 +1141,11 @@ async def _pipe_file( size = len(data) # 5 GB is the limit for an S3 PUT if size < min(5 * 2**30, 2 * chunksize): - await self._call_s3( + out = await self._call_s3( "put_object", Bucket=bucket, Key=key, Body=data, **kwargs ) + self.invalidate_cache(path) + return out else: mpu = await self._call_s3( @@ -1177,7 +1179,7 @@ async def _pipe_file( UploadId=mpu["UploadId"], MultipartUpload={"Parts": parts}, ) - self.invalidate_cache(path) + self.invalidate_cache(path) async def _put_file( self,