Support » Plugin: rtMedia for WordPress, BuddyPress and bbPress » Doesn’t Delete Database files

  • Resolved DamnDramaQueen

    (@damndramaqueen)


    Hi rtmedia,

    I realized when a user deleted photos from the front-end. It’s gone from the front-end. But it DOESN’T deleted/erased from the database table? Here are just few examples.

    If the users keep deleting and/or keep uploading. The database will be 10 + miles long.

    ABSPATHwp-content/uploads/rtMedia/users/1/ELEPHANE.jpg
    ABSPATHwp-content/uploads/rtMedia/users/1/flower1964.jpg
    ABSPATHwp-content/uploads/avatars/1/horses.jpg

    How can it also deleted from the database either.
    Please help, Thanks

    • This topic was modified 6 months ago by DamnDramaQueen. Reason: rephasing the subject
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Krupa

    (@krupajnanda)

    Hi @damndramaqueen,

    I hope you are doing good.

    My apologies for the delayed response.

    Please consider the below scenario to delete media.

      1. When uploaded image is deleted from rtMedia’s media tab, it won’t delete the image from wp-admin’s media library
      2. Same happens with activity, if a media is deleted from the activity it won’t be deleted from media library
      3. When a media is deleted from wp-admin’s media library, it won’t be shown on rtMedia’s media tab as well as rtMedia’s activity tab as in this case it is deleted from the database

    So to get the media deleted from the database you need to delete it from wp-admin/upload.php page

    I hope this would help you resolve your problem.

    Please let us know if you have any further queries.

    Have a nice day!

    Regards,
    Krupa

    DamnDramaQueen

    (@damndramaqueen)

    Hi krupajnanda,

    Thanks for your response,

    Yes, I understand what you are saying from top to bottom.

    The bad thing is, the regular members will deleted and re-upload other image(s) off and on, it will then remains in the library AND DB.

    But is there’s any ways the admin can found out what photo was deleted recently by the members? Then the Admin (me) will know which image(s) to completely erased. Otherwise, eventually the DB / library will be a 100+ miles long.

    By any chance, is there function, plugin can determine the latest photo deletion?
    Please advice if any? Thanks

    Plugin Contributor Krupa

    (@krupajnanda)

    Hi @damndramaqueen,

    But is there’s any ways the admin can found out what photo was deleted recently by the members? Then the Admin (me) will know which image(s) to completely erased. Otherwise, eventually the DB / library will be a 100+ miles long. By any chance, is there function, plugin can determine the latest photo deletion?
    Please advice if any?

    Ummmm….Well, as per my knowledge there is no such thing currently available in rtMedia. However, I would still like to check with my engineering team to confirm this part. I will pass this query to them and will get back to you soon once I hear from them!

    Have a nice day!

    Regards,
    Krupa

    Plugin Contributor Krupa

    (@krupajnanda)

    Hi @damndramaqueen,

    I hope you are doing good!

    Regarding your query, I had a discussion with my engineering team and we come up with the solution.

    To achieve the functionality you mentioned above, you can use the code snippet mentioned here – https://rtmedia.io/docs/developers/automatically-delete-media-from-wordpress-media-library/

    We have mentioned everything in the above doc where the code should go and what modification you can do with that.

    Please try this and let me know if that works for you.

    Looking forward to hearing back from you.

    Have a nice day!

    Regards,
    Krupa

    DamnDramaQueen

    (@damndramaqueen)

    Hi @krupajnanda,

    OMG OMG!!! You and your engineering teams did it πŸ™‚ πŸ™‚ Works like a charm!!!

    I logged-in as a Temp-User and tested 2 different times. Uploaded and Deleted from the media tab. It’s MAGIC πŸ™‚ πŸ™‚ Both photos are gone from the Library and the Database after deletion.. πŸ™‚

    Ya, now it works so much better for running a social sites! Especially if sites with thousands of users, when they continuously deleting them. Now the DB will stay small but ONLY held those active photos.

    You guys are GREAT, SUPER, ROCKS!!!!

    Thank you so much for the function and it cured our lifetime headache! πŸ™‚ πŸ™‚

    Thank you again. Have a wonderful weekends. Best wishes to all…

    Plugin Contributor Krupa

    (@krupajnanda)

    Hi @damndramaqueen,

    We are glad to know that your problem is been resolved now with the given custom code.

    Thank you for using rtMedia plugin!

    We are glad to have you as our customer and we strive to make your experience better. We would appreciate it if you could give us your valuable feedback on rtMedia as a plugin and how it has helped you. This can help us serve you better.

    You can share your feedback here – https://wordpress.org/support/plugin/buddypress-media/reviews/

    Have a great weekend!

    Regards,
    Krupa

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.