This topic has 4 replies, 2 voices, and was last updated 9 years by Abe.

  • Author
  • #76100
     efullman
    Participant

    Hi,

    Love the plugin, and Kleo, I’ve been running both on our servers.

    I’ve since needed to restructure our architecture, and move image files off the WordPress Server. I’m using S3-Uploads after a lot of testing. This plugin takes a different approach to the problem, and facilitates the process by redirecting uploads to S3 buckets, and dynamically redirecting upload directory requests to the S3 buckets without changing the db. It works great with Kleo with one exception.

    When S3-Uploads is activated BuddyPress Cover Photo can’t upload a file correctly and delivers the attached error message (see image). We think it maybe an incompatibility with how you are using wp_handle_upload it seems to completely fail, and doesn’t create the file on local file system or the S3 bucket. For the cover photo files that were previously uploaded and synced into S3 they are read from S3 without a problem.

    This seems to be isolated to the upload process from BuddyPress Cover Photo, the rest of Kleo and other plugins seem fine.

    I was wondering if you could help us isolate a patch. Here is the conversation with S3-Uploads plugin author https://github.com/humanmade/S3-Uploads/issues/46.

    Thanks in advance for your help. I love the plugin, but I can’t move revert backward on the architecture change to move this media off the WordPress server.

    Attachments:
    You must be logged in to view attached files.
    #76373
     Abe
    Keymaster

    Hi, we will be doing some tests and will let you know

    Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #77112
     efullman
    Participant

    Any ideas on how to work around this?

    #78335
     Abe
    Keymaster

    Hi, unfortunately we haven’t made any progress on this but I will let you know ASAP once I have some updates

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #78353
     Abe
    Keymaster

    You can try adding this in your child functions.php

    COPY CODE
    
    add_filter('upload_dir', 'bcp_custom_upload_dir' );
    
    function bcp_custom_upload_dir($args) {
        if (isset($_POST['action']) && $_POST['action'] == 'bp_upload_profile_cover' ) {
            $args['path'] = $args['basedir'] . "/bcp-user" . $args['subdir'];
            $args['url'] = $args['baseurl'] . "/bcp-user" . $args['subdir'];
        }
        if (isset($_POST['action']) && $_POST['action'] == 'upload_group_cover' ) {
            $args['path'] = $args['basedir'] . "/bcp-group" . $args['subdir'];
            $args['url'] = $args['baseurl'] . "/bcp-group" . $args['subdir'];
        }
        return $args;
    }
    

    This should make the uploads for the profile cover in a bcp-user folder and the group cover in a bcp-group folder

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?