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

  • ACF has it’s own function and hooks

    
    
    $errors = apply_filters( "acf/upload_prefilter/type={$field['type']}", $errors, $file, $field );
    $errors = apply_filters( "acf/upload_prefilter/name={$field['_name']}", $errors, $file, $field );
    $errors = apply_filters( "acf/upload_prefilter/key={$field['key']}", $errors, $file, $field );
    $errors = apply_filters( 'acf/upload_prefilter', $errors, $file, $field );
    

    Same as the wp hook but also passes the $field.