Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Forked from loftux/deleteThumbnails.js
Created May 8, 2018 19:50
Show Gist options
  • Save douglascrp/e89f593e8990202533a286fbfe4cc1ad to your computer and use it in GitHub Desktop.
Save douglascrp/e89f593e8990202533a286fbfe4cc1ad to your computer and use it in GitHub Desktop.
// Delete thumbnails if exists. To be used in Alfresco javascript console. Starts from selected space
recurse(space, function(node) {
var doclib = node.getThumbnail('doclib');
var webpreview = node.getThumbnail('webpreview');
var webpreview2 = node.getThumbnail('web-preview');
var imgpreview = node.getThumbnail('imgpreview');
var pdf = node.getThumbnail('pdf');
if(doclib){
doclib.remove();
}
if(webpreview){
webpreview.remove();
}
if(webpreview2){
webpreview2.remove();
}
if(imgpreview){
imgpreview.remove();
}
if(pdf){
pdf.remove();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment