How to get file upload value in front-end to put in ACF image field

First, verify that the file has been uploaded successfully. The wp_handle_upload function is great for simple processing of the upload itself.

Once it’s uploaded, in order to attach the file to the ACF field, you’ll need to process it as a WordPress attachment so that the Media Library and ACF are aware of it.

Finally, after the attachment is created, you can use the attachment ID (along with the ACF field key and your post ID) to update the ACF field so that it references the new media item:

update_field('field_12345', $attachment_id, $post_id);