Skip to content

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

@niccolox

Description

@niccolox

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions