Set FileUpload value from another field

how can i set FileUpload value from another field? i'm trying to set an image to FileUpload field but it's not working.
i've got this error: "foreach() argument must be of type array|object, string given."

actualy i'm doing it like: $set('image', $imagePath) and it's wrong.

how can i do this?
Solution
try $set('your_file_field', ['new_file.xxx'])
Was this page helpful?