Bucket policy question

I have the following scenario:

userA and userB each have the ability to upload files to a specific folder path.
((bucket_id = 'contract-attachments'::text) AND ((uid())::text = (storage.foldername(name))[2]))

what I'm struggling to figure out at the moment, is how to write a policy that would allow both users to select/download each other attachments. I also wonder if there's a way for me to rearchitect these file paths to make the problem simpler
Screen_Shot_2022-08-28_at_10.41.45_AM.png
Was this page helpful?