Support » Plugin: Contact Form 7 » Local File attachments do not work in Pantheon hosting

  • Hi @takayukister,

    It seems this line of code in contact-form-7/includes/functions.php:422-434

    
    function wpcf7_is_file_path_in_content_dir( $path ) {
               if ( 0 === strpos( realpath( $path ), realpath( WP_CONTENT_DIR ) ) ) {
                       return true;
               }
    
               if ( defined( 'UPLOADS' )
               and 0 === strpos( realpath( $path ), realpath( ABSPATH . UPLOADS ) ) ) {
                       return true;
               }
    
               return false;
    }
    

    Will always return true in Pantheon because by architecture, the wp-content/uploads is symlinked to the networked filesystem using Fusedav driver.

    Would it be possible if we can PR or suggest code that it can work on Pantheon wp-content/uploads symlinked folder?

    Thank you for your kind consideration!

    • This topic was modified 9 months, 2 weeks ago by Carl Alberto.
    • This topic was modified 9 months, 2 weeks ago by Carl Alberto.
  • The topic ‘Local File attachments do not work in Pantheon hosting’ is closed to new replies.