• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Deleting Multiple images

R

rinku2012

Guest
Hello,

I would like to delete all older images under user folders. Presently the default value for listing is 25. i can delete 25 images at once easily. when i keep the images to 200 or 500 per page for deleting, my browser is getting into hung state for 3 to 5 minutes and then images load up. after i delete sometimes i get the below error

Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-600,26) chv_images LEFT JOIN chv_storages ON chv_images.image_storage_id = chv_' at line 4

its taking ages for me to delete multiple images. What is the best way to delete more then 500 images at once

I have Xeon E3 with 16 GB Ram and SSD HD. i dont think so its server issue
 
Easy as don't queue 500 jobs at the same time time. It actually depends on your machine, start with 25 then try it with more.

I delete up to 250 at demo.chevereto.com with no hangs at my side.
 
is there any other way to delete more images as i have more then 200K images. how to delete guest images
 
i am not asking to delete all 200K images. i need to delete 500 images per attempt and few of guests images. how can i do that
 
Sorry but like I said, it depends on your machines. Your server / computer can't handle that load and at this time there's no tool to get rid of those images.
 
Code:
function deleteBunchOfPics() {
    if($("[data-content=list-selection]:visible").hasClass("disabled")) {
        return;
    }
    CHV.fn.list_editor.selectItem($(".list-item:visible:not(.selected)"));
    CHV.fn.list_editor.listMassActionSet("clear");
    $("[data-content=list-selection]:visible [data-action=delete]").click();
    setTimeout(function() {
        $("[data-action=submit]", PF.obj.modal.selectors.root).click();
        setTimeout(function() {
            location.reload();
        }, 500);
    }, 500);
}
deleteBunchOfPics();

This JS code will delete all images on a listing page then it will reloads the page so the idea is to trigger this again and again. You can achieve that with a browser extension which allows you to run JavaScript on load. Something like this: https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija

Simply go to the listing that you want to wipe, add the JS and wait until it wipes all content.

Just tested and it works, just try to set your listings to 20-50 (less is better) and run this thing. By the way, you should turn on maintenance mode when doing this because you will issue lots of mysql queries here.

Hope it helps.
 
Rodolfo Thanks. Script is working. it just saves our time by not manually deleting the pics every time
 
Back
Top