05-21-2014 07:01 AM
var file = ${find from repo}
file.ensureVersioningEnabled(true, true);
file = file.checkoutForUpload();
file.properties.content.write(content, false, true);
file.properties.content.setEncoding("UTF-8");
file.properties.title = title;
file.properties.description = description;
file.properties.content.guessMimetype(filename);
file.save();
file = file.checkin("Item Updated by "+person.properties.userName);
extractMetadata(file);