is it possible to make unlimited time on aliyun oss when generating link?

454 views Asked by At

is that posible to generate link on alibaba with aliyun to make unlimited expired link ?

$timeout = 0; //default 3600 
$signedUrl = $ossClient->signUrl($bucketName, $object, $timeout, "GET");
echo $signedUrl;
2

There are 2 answers

2
Andrea Olivato On

From the Official Documentation, it's not possible.

The maximum validity period of a URL is 32,400 seconds, so 9 hours.

Here's the full information from the link above:

enter image description here

0
sykez On

Andrea is right about the maximum validity of signed URL. If you're looking for a static URL which never expires, I see only two options:

  • Make it public - You can set the Access Control List (ACL) for this object to public-read so it can be viewed by anyone with the link. You can set the ACL for the object via API or web console.
  • Serve object from your API - Your API can get the object from OSS and stream it to the client. This method is helpful if the object is behind some authorization from your application and don't want the object to be completely public.