• Resolved Doc Young

    (@ijyoung)


    I have recently found that files uploaded via
    function contactform7_before_send_mail( $form_to_DB ) {}

    has changed the file name to a string. Interestingly enough it does not affect any images but it doesnt work for pdf or word documents

    The code has worked ok for two years and it only in the last few weeks that this has happened.
    the start of function is
    function contactform7_before_send_mail( $form_to_DB ) {
    global $wpdb;
    $form_to_DB = WPCF7_Submission::get_instance();
    if ( $form_to_DB )
    $formData = $form_to_DB->get_posted_data();
    $uploaded_files = $form_to_DB->uploaded_files();

    $image_name = $formData[Photo];
    It would appear that by time FormData[Photo] the file name has been changed to a 32 number string.
    Anyone have any thoughts what has happened

    Contact form 7 vers 5.2.2

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘File upload name change in FormData()’ is closed to new replies.