from.createSignedUrls()

1  final List<String> signedUrls = await supabase
2    .storage
3    .from('avatars')
4    .createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60);

Notes#

  • 需要RLS策略权限。
    • buckets表的权限: 没有
    • objects表的权限: select.
  • 请参考存储指南中关于访问控制的工作方法

Examples#

创建签名的URL#

1  final List<String> signedUrls = await supabase
2    .storage
3    .from('avatars')
4    .createSignedUrls(['folder/avatar1.png', 'folder/avatar2.png'], 60);