Support

Account

Home Forums General Issues Force an Image/File upload to a particular directory Reply To: Force an Image/File upload to a particular directory

  • I found some information about altering the upload file name

    https://developer.wordpress.org/reference/hooks/wp_handle_upload_prefilter/

    Thanks. I wonder how I would ensure that only applies to the ACF field in question, rather than filters ALL WordPress file uploads?

    (FYI – It’s on user-edit.php. I’d like to rename the file being uploaded through an Image field – specifically, by getting the ID and then username of the user currently being edited… which is proving to be the next challenge).

    Given that that I already have ACF filters going to take the Image and change the destination directory (as per the other thread), I’m not certain how it should fit together.