Here’s some code that will get you at least half way there:
https://gist.github.com/spivurno/35b86c47cdf0124be735
Changes you’ll need to make:
- Also stash the current
$entry
object in thestash_current_field_id()
method. - Use the stashed
$entry
to modify the file upload path in themodify_file_upload()
method.