How do I stop Object Storage Service file links from expiring?

主宰稳场 提交于 2021-01-29 09:13:39

问题


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?

Time of expiry options


回答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.

  1. Change OSS bucket ACL https://www.alibabacloud.com/help/doc-detail/31898.htm
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!