Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • mindsetworks Friend
    #1035156

    When I upload an image via the EasyBlog interface it doesn’t change the url to use S3 after I upload what’s wrong?

    I assumed the plugin would handle this. I did a video of what I’m doing.
    https://goo.gl/Ws7OcG

    Anonymous Moderator
    #1035408

    Hi,

    Our team is working on your question an we will try to get back to you asap. Please stay tuned.

    Mo0nlight Moderator
    #1036191

    Hi.

    Open file :
    plugins/system/plg_jaamazons3/plg_jaamazons3.php

    Look for:

                //find and replace urls
                $pattern = "/(link.*href|src|poster)\s*=\s*(\")\/([^\/][^\'\"]*)(\")/i";
                $body = preg_replace($pattern, '$1=$2'.$host.'/$3$4', $body);
                $pattern = "/(link.*href|src|poster)\s*=\s*(\')\/([^\/][^\'\"]*)(\')/i";
                $body = preg_replace($pattern, '$1=$2'.$host.'/$3$4', $body);

    Change to:

                $protocol = preg_replace('/\:(.*?)$/',':/',$host);
                //find and replace urls
                $pattern = "/(link.*href|src|poster)\s*=\s*(\")\/([^\/][^\'\"]*)(\")/i";
                $body = preg_replace($pattern, '$1=$2'.$host.'/$3$4', $body);
                $pattern = "/(link.*href|src|poster)\s*=\s*(\')\/([^\/][^\'\"]*)(\')/i";
                $body = preg_replace($pattern, '$1=$2'.$host.'/$3$4', $body);
                $pattern = "/(link.*href|src|poster)\s*=\s*(\")\/\/([^\/][^\'\"]*)(\")/i"; // with // start
                $body = preg_replace($pattern, '$1='.$protocol.'/$3', $body);
                $pattern = "/(link.*href|src|poster)\s*=\s*(\')\/\/([^\/][^\'\"]*)(\')/i"; // with // start
                $body = preg_replace($pattern, '$1='.$protocol.'/$3', $body);
Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 2 replies, has 3 voices, and was last updated by  Mo0nlight 6 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum