supabase-py
supabase-py copied to clipboard
Extra / in storage get_public_url() method
Describe the bug There is an extra forward slash returned in the get_public_url method.
To Reproduce Steps to reproduce the behavior:
- Instantiate SupabaseStorageClient
- Use client.from_({bucket}).get_public_url({filename})
- Result is 'https://{database}.supabase.co/storage/v1//object/public/{bucket}/{filename}'
Expected behavior 'https://{database}.supabase.co/storage/v1/object/public/{bucket}/{filename}' which matches what you get from the supabase website console when clicking the button for public_url.
Desktop (please complete the following information):
- OS: Windows11
- Python: 3.9.9
- Supabase version: 0.5.8
Additional context Deleting the extra / between v1 and object does give the correct url.
Can you use this package for Supabase storage ?
Can you use this package for Supabase storage ?
I think that's how you're supposed to access it via python. It builds off of another package, which specifically recommends using this 'master' package to interact with the storage api.
Would you like to open a bug-fix PR? You'd just need to remove the /
before object
on this line I think. (It looks like base_url
has a trailing /
, looking at the implementation of create_signed_url
above this method).
Would you like to open a bug-fix PR? You'd just need to remove the
/
beforeobject
on this line I think. (It looks likebase_url
has a trailing/
, looking at the implementation ofcreate_signed_url
above this method).
Done! Feel free to review and approve. Thanks for finding the line in issue!!
@anand2312 Can you review and approve?
Any way to get this pull request integrated? It is the most minor of corrections and won't cause issues.
Merged the PR, this will be updated here in the next version. Thanks for your contribution!