Scripting and WebDAV
PostPosted:Wed Mar 21, 2012 8:09 pm
I have created a script in a certain folder, so that when a new folder is created it gets renamed, see code below:
But when I use a WebDAV client (e.g. NetDrive) this script does not work.
I am using version 5.1.7, build 7085.
Any one knows why this happens.
Thanks in advance
Govinda
Code: Select all
This works well when OpenKM is accessed via a web browser.import javax.jcr.*;
import com.openkm.core.*;
import com.openkm.bean.*;
import com.openkm.api.OKMDocument;
String userID = session.getUserID();
String parentDir = com.openkm.util.FileUtils.getParent(eventNode.getPath());
String docName = com.openkm.util.FileUtils.getName(eventNode.getPath());
if (eventType.equals("CREATE_FOLDER")) {
session.move(eventNode.getPath(), parentDir + "/" + userID + " " + docName);
session.save();
}
But when I use a WebDAV client (e.g. NetDrive) this script does not work.
I am using version 5.1.7, build 7085.
Any one knows why this happens.
Thanks in advance
Govinda