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

expand docs: def bucket({_file, scope}), do: scope.bucket || bucket() #96

Open
niccolox opened this issue Apr 26, 2022 · 0 comments
Open

Comments

@niccolox
Copy link

niccolox commented Apr 26, 2022

I am using Waffle, Waffle Ecto, Phoenix, and an S3 image store.

Works great, thanks for bringing life again to this ecosystem.

I see in a recent PR it's now possible to define buckets based on scope, this is a great new feature, been wanting it for ages.

def bucket({_file, scope}), do: scope.bucket || bucket()

Can I get some clues via a recipe or doc or example?

How do I need to use the Store with Scope in the context of Ecto and Phoenix?

I suspect bucket scope might effect

  1. Definition ImageUploader: what examples of definitions for a bucket?
  2. How do I get scope into the ImageUploader? I want the scope to be passed in via the normal Phoenix form, what mods allow me to use the scope in that form?
  3. Do I need to make a custom changeset or function?
  4. Schema i.e. Post, do I need a changeset for Store of the scope?
@niccolox niccolox changed the title def bucket({_file, scope}), do: scope.bucket || bucket() expand in docs on def bucket({_file, scope}), do: scope.bucket || bucket() Apr 26, 2022
@niccolox niccolox changed the title expand in docs on def bucket({_file, scope}), do: scope.bucket || bucket() expand docs: def bucket({_file, scope}), do: scope.bucket || bucket() Apr 26, 2022
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

No branches or pull requests

1 participant