BuddyDev

Search

[Resolved] Mediapress Bulk Uploads

  • Participant
    Level: Master
    Posts: 279
    NikB on #30500

    Thank you again Brajesh… I *almost* understand what you’re saying, although does seem strange that it works if users upload directly from the activity screen but not when uploading in their own galleries, you know your way around BuddyPress far better than I ever will so I’m assuming there’s a good reason why that’s the case and not something that’s easily overridden πŸ˜‰

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #30502

    Hi Nik,

    Thank you for the understanding.

    I do hope to update the workflow in future.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #30518

    Hi Brajesh

    So sorry to trouble you again but I am trying to understand why this works automatically when files are uploaded from the activity feed but not when they’re uploaded from the profile/gallery ie. is there any specific reason (other than, it just hasn’t been implemented that way) and if not, how difficult do you think it would be to hook into the same action as runs when uploading from the activity feed?

    I really wish this wasn’t such an issue for me but my clients have used rtMedia in the past and can’t understand why I am struggling to offer them the same functionality. Of course, I personally think MediaPress is better in many ways but my clients aren’t currently seeing it that way πŸ˜‰

    With many thanks again
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #30537

    Hi Nik,
    Thank you.

    Here are a few things to know:-

    1. Individual file uploads are only an atomic action for the server. They don’t know if someone uploaded only 1 file or 5 files together.
    For server, they do not understand what is a bulk action.

    To achieve a feeling of bulk upload, we store the uploaded file details on client side(in activity) and then when activity is posted, we use these file ids with the newly created update to check if there was any file uploaded and how many was there.
    In other words, client re-sends the list of files uploaded earlier and now server knows it was bulk.

    In case of upload from gallery, we do not keep a record of all the files uploaded client side and we do not inform server that consider these n files as single unit.

    We can do it by sending a new request at the end of the uploads to inform server. It is not very difficult to achieve .
    Currently, my team lacks the bandwidth to have this feature added in the plugin.

    I hope it clarifies.

    Regards
    Brajesh

    • This reply was modified 4 years, 5 months ago by Brajesh Singh. Reason: updated
  • Participant
    Level: Master
    Posts: 279
    NikB on #30541

    Hi Brajesh

    Thank you so much for your time.

    I understand completely what you say about the fact that the server can’t identify how many files have been uploaded and having delved into the code, I can see how you’ve handled this.

    > “In case of upload from activity, we do no keep a record of all the files uploaded client side and we do not inform server that consider these n files as single unit.”

    I guess this is the part I am still trying to get my head around ie. what is the difference with an activity upload which means that the number/details of files ARE stored somehow and can used to create an activity entry at the time of upload.

    > “We can do it by sending a new request at the end of the uploads to inform server. It is not very difficult to achieve.”

    I am assuming this is how one would handle creating the relevant activity entry for a bulk upload from the gallery? Presumably by hooking into mpp:uploader:upload.complete?

    My client is willing to pay me to overcome this issue if I can, I’m just trying to work out if it’s realistic for me to attempt πŸ˜‰

    Thank you again for all your assistance and I shall do some more digging myself.

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #30547

    Hi Jik,
    I have updated the post. The mention was for “Gallery” upload and not activity.

    In case of upload from gallery, we do not keep a record of all the files uploaded client side and we do not inform server that consider these n files as single unit.
    

    It is easily doable and you do not need to create any activity. There are functions to do that.
    Please search for wp_ajax_mpp_publish_gallery_media in the code to see how it happens.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 25
    Earl D on #49074

    Is this still valid I don’t the the buddy press activity option in media press setting running only sitewide gallery but not able to do bulk uploads.

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #49078

    Hi Earl,
    Thank you for your reply.

    Please open a new topic with your specific details and we will assist.
    The bulk upload is supported out of the box in sidewide gallery.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved