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'])
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreira4mo ago
try $set('your_file_field', ['new_file.xxx'])
yohanan
yohananOP4mo ago
Yes👍 thanks. It's working perfectly.
Want results from more Discord servers?
Add your server