Page 1 of 1

Delete Files from Trash

PostPosted:Wed Apr 15, 2015 7:48 am
by tron
Hi,

i found out if i delete folders with lots of files from trash it takes a long time. is it possibile to configure openKM to delete files directly without moving into trash folder?

thanks for help :)

Re: Delete Files from Trash

PostPosted:Fri Apr 17, 2015 10:08 am
by pavila
It's the default behavior. In the API there is a "purge" method which remove the document (or folder) without going to trash, but from UI you only can delete (and this implies move the deleted document or folder to trash). The trash should be emptied periodically to prevent storing a lot of unused documents, and this means it may take a lot of time when emptying it.

Re: Delete Files from Trash

PostPosted:Tue Apr 28, 2015 10:30 am
by tron
okay, so if I understand this correctly, there is a method I could call with my CMIS client to immediately purge a document, rather than move it to the trash folder? I'm asking because we're using only the CMIS protocoll in my project and really would like to keep it that way, than implementing one more API just for this one purge method.

Re: Delete Files from Trash

PostPosted:Thu Apr 30, 2015 8:34 pm
by jllort
I'm not sure if exists a method for it on CMIS, probably exists a general purpose delete what internally each DMS decide what will be doing. In our case we separate delete from purge action ( not everybody does it ). Anyway if you want each delete be followed by a purge action is so easy. Simply create a Automation task based on document move event, with a validadation ( any document into /okm:trash ) and execute a simply script
Code: Select all
OKMDocument.getInstance().purge(null,uuid);
Relevant information for doing it:
http://sourceforge.net/projects/openkmportabledev/ ( portable dev environment with automation examples )
http://wiki.openkm.com/index.php/Automation
http://doxygen.openkm.com/openkm/de/de7 ... ument.html