问题
I have been using OSS (Object Storage Service) buckets to store videos and I need links that don't expire.
When I generate a link in OSS browser I get the option to set the time of expiry, but there is no option to turn the expiry off.
Is there any way to generate links that do not expire?
回答1:
There is only one way to do it. You can change the bucket ACL to a public or public read (please remember about the risk of data leak) or better solution could be to change ACL for an object only.
- Change OSS bucket ACL https://www.alibabacloud.com/help/doc-detail/31898.htm
- Change OSS object ACL https://partners-intl.aliyun.com/help/doc-detail/52284.htm
Option 2 is much better because the whole bucket can still have private ACL while single objects can be in public read.
Once the bucket or object (preferred way) has public read ACL when you click Copy File URL you can share the object.
FYI - the default sharing of the object is set to ?Expires=1544615363 which is in seconds and it equals to 17877.49262731 days and it is 48.97 Years :)
来源:https://stackoverflow.com/questions/53728996/how-do-i-stop-object-storage-service-file-links-from-expiring