Universal function put_upload_change to support all field names #1079
Unanswered
bulatshafigullin
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Also would be great to be able to get other config params like max_entries |
Beta Was this translation helpful? Give feedback.
1 reply
-
Finally fellow developer advised to use inline fn
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm writing universal function to make upload config,
so basically in my LiveResource I want to do something like this
@impl Backpex.LiveResource def fields do [image: Uploads.make_upload(%{label: "Pic", upload_key: :my_pic_field})]
so I wrote module Uploads, which has
put_upload_change
func.And in that function I need to know param name to put one in the map params
`case files do
[file] ->
Map.put(params, "image", media_subdir() |> Path.join(file))
What's the best way to get that param name?
Beta Was this translation helpful? Give feedback.
All reactions