Signed URLs
# sql
p
Signed URLs
Hello😀 Is there any way to to create a signed URL to the object on the sql level? Is there any function that would do that? Like storage.objects.generateSignedURL() or something like this?
s
No there is no function to do that from the sql level as far as I'm aware
g
I use the http extension to call storage for deletes from a a postgresql function. Should be able to do that for signedURL. But it is a painful way to have to do it.
p
I'm looking to restrict iterating through a bucket, while allowing users to create signed URLs, does anyone know how to approach that? There doesn't seem to be any function equivalent to generateSignedURL in the schema, SELECT permission lets you both list and create URLs. The only thing I can think of is running the HTTP request directly from an SQL function and restricting access inside of that function. Are there any other alternatives?
Maybe there is a way to restrict some of the functions while allowing the others in the SELECT permission for the bucket? I need SELECT permission for my 'avatars' bucket, to allow the users to upload and display their avatars, however, I would like to restrict the storage.from.list function, so that a random user would not be able to list all files in the bucket