如何阻止对象存储服务文件链接过期? [英] How do I stop Object Storage Service file links from expiring?

查看:51
本文介绍了如何阻止对象存储服务文件链接过期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 OSS(对象存储服务)存储桶来存储视频,我需要不会过期的链接.
当我在 OSS 浏览器中生成链接时,我可以选择设置到期时间,但没有关闭到期时间的选项.

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?

推荐答案

只有一种方法可以做到.您可以将存储桶 ACL 更改为公开或公开读取(请记住数据泄漏的风险),或者更好的解决方案是仅更改对象的 ACL.

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. 更改 OSS 存储桶 ACL

选项 2 更好,因为整个存储桶仍然可以拥有私有 ACL,而单个对象可以公开读取.

Option 2 is much better because the whole bucket can still have private ACL while single objects can be in public read.

当您点击复制文件 URL 时,一旦存储桶或对象(首选方式)具有公共读取 ACL,您就可以共享该对象.

Once the bucket or object (preferred way) has public read ACL when you click Copy File URL you can share the object.

仅供参考 - 对象的默认共享设置为 ?Expires=1544615363,以秒为单位,等于 17877.49262731 天,即 48.97 年 :)

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 :)

这篇关于如何阻止对象存储服务文件链接过期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆