Page 1 of 1

Possible to Undo an Upload?

PostPosted:Thu Feb 18, 2016 11:31 pm
by alexwgordon
Hi all,

I figured this was not possible since it would defeat the purpose of the system, but is it possible to UNDO an upload once its occurred? We've had a few instances where a user uploaded the wrong rev of the file and wanted to re-upload the correct one, without having to increase the revision twice. is this possible? Thanks!

Re: Possible to Undo an Upload?

PostPosted:Sat Feb 20, 2016 10:56 am
by jllort
Have several option from the easiest to the more complex:
1- Execute daily report ( crontab ) -> documents created and verify wrong name format.
2- Do Automation action based on document create -> at post, validate the name and if it's wrong, delete, remove, send some mail, show warning.
3- Do Automation action based on document create -> at pre ( probably need minimal source code modification ) -> evaluate the name before creating and if it's not compliant raise and exception.

Related url:
for crontab -> http://wiki.openkm.com/index.php/Crontab and http://wiki.openkm.com/index.php/Cronta ... h_metadata

for automation action -> Automation must be enabled doing a database sql insert http://wiki.openkm.com/index.php/Enable_automation and also take a look here http://wiki.openkm.com/index.php/Extend_automation_6.4 ( plugin feature is not present at community version ! )

Actions: https://sourceforge.net/p/openkm/code/H ... on/action/
for automation action at pre ->
https://sourceforge.net/p/openkm/code/H ... odule.java ( line 224 look at BaseDocumentModule ) and then https://sourceforge.net/p/openkm/code/H ... odule.java ( line 107 to 113 ). For what I'have seen seems you have document name int environment vars ( that's what you must evaluate into your own action class )

I suggest also download our portable dev environment https://sourceforge.net/projects/openkmportabledev/