Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add url option when get public image url #7

Conversation

tranhoangvuit
Copy link
Contributor

@tranhoangvuit tranhoangvuit commented Jul 3, 2023

What kind of change does this PR introduce?

Add url option when get public image url

What is the current behavior?

Refer to JS lib: supabase/storage-js#145

What is the new behavior?

We have added the UrlOptions parameter to support this new feature. By leaving it empty, we ensure backward compatibility with the previous version.

result := storage_go.GetPublicUrl("bucket", "file.jpeg", storage_go.UrlOptions{
  Transform: {
    Width: 100,
    Height: 100,
  },
  Download: true,
})

origin:

result := storage_go.GetPublicUrl("bucket", "file.jpeg")

@tranhoangvuit tranhoangvuit self-assigned this Aug 7, 2023
@tranhoangvuit tranhoangvuit merged commit 9d94951 into supabase-community:dev Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant