diff --git a/fs_s3fs/_s3fs.py b/fs_s3fs/_s3fs.py index d7f98e2..7436e50 100644 --- a/fs_s3fs/_s3fs.py +++ b/fs_s3fs/_s3fs.py @@ -801,7 +801,7 @@ def move(self, src_path, dst_path, overwrite=False): self.copy(src_path, dst_path, overwrite=overwrite) self.remove(src_path) - def geturl(self, path, purpose="download"): + def geturl(self, path, purpose="download", expiration=3600, **extra_params): _path = self.validatepath(path) _key = self._path_to_key(_path) if _path == "/": @@ -809,7 +809,8 @@ def geturl(self, path, purpose="download"): if purpose == "download": url = self.client.generate_presigned_url( ClientMethod="get_object", - Params={"Bucket": self._bucket_name, "Key": _key}, + Params={"Bucket": self._bucket_name, "Key": _key, **extra_params}, + ExpiresIn=expiration ) return url else: diff --git a/fs_s3fs/_version.py b/fs_s3fs/_version.py index a82b376..c68196d 100644 --- a/fs_s3fs/_version.py +++ b/fs_s3fs/_version.py @@ -1 +1 @@ -__version__ = "1.1.1" +__version__ = "1.2.0"