Skip to content

Commit 1ef3d1f

Browse files
committed
Add docs
1 parent 036af34 commit 1ef3d1f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/upload/multi.ex

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ defmodule Upload.Multi do
9494
9595
- `canned_acl` - The canned ACL to use with S3 if using S3 as the storage
9696
backend.
97+
- `key_function` - A function which recieves the schema specified by `subject`
98+
from the multi and must return a file storage path without the extension.
99+
- `validate` - A 2 arity function which recieves the changeset and the field
100+
being modified. Additional changeset logic can be added here, such as
101+
validating the file format or size of the upload.
97102
"""
98103
def handle_changes(multi, name, subject, changeset, field, opts \\ []) do
99104
key_function = key_function_from_opts(opts)

0 commit comments

Comments
 (0)