mendo
06/06/2022, 8:24 PMvideos
table that is linked to the file, says it's "public".
More about this structure in this threadNeedle
06/06/2022, 8:24 PMmendo
06/06/2022, 8:27 PM/videos/{auth.id()}/{uuid}.mp4
And on the "videos" table, a new record get's added with
id = uuid
title = string
description = string
privacy = "public" | "private"
So under the storage policies I'd like to query the filename as the row id, and check if the video is public or not...Needle
06/06/2022, 8:28 PMmendo
06/06/2022, 8:33 PMsql
LOWER((storage.foldername(name))[1]) = 'public'
Is this the recommended way to do it?garyaustin
06/06/2022, 9:37 PM