How to get the files names of uploaded files in gform_validation [RESOLVED]

When validating the form (in gform_validation), all the uploaded files are in the /tmp folder. At what stage in the process are they moved to the 2023/05 folder? Is there a way to figure out where the temp files will be moved?


Are you using the standard single file upload field, or is the multi-file feature enabled?

Multi file

The files will be moved to their final location when the entry is saved to the database. The following can be used to find the destination:

$target = GFFormsModel::get_file_upload_path( $form_id, $uploaded_filename );

$target will be an array containing the path and the url.

1 Like

Thank you, that worked!

1 Like