02-26-2010 10:11 AM
03-01-2010 04:39 AM
03-01-2010 07:48 AM
are you trying to avoid adding to folder completely? Because you could use the original content's parent for the converted content, too.I don't want to add it to any folder because I don't want it to be available as a seperate document. I don't want people to version the transform, remove it, edit it or anything like that, I only want to offer it as a download by using a custom library action.
var results = [];
var files = p_params.files;
var file, result, nodeRef;
for (file in files)
{
nodeRef = files[file];
result =
{
action: "downloadPdf",
nodeRef: nodeRef,
success: false
}
file = search.findNode(nodeRef);
var pdfFile = file.transformDocument("application/pdf");
if (!file.hasAspect("cm:transformable")) {
file.addAspect("cm:transformable");
}
file.createAssociation(pdfFile, "cm:formats");
result.id = pdfFile.name;
result.nodeRef = pdfFile.nodeRef.toString();
result.success = true;
results.push(result);
}
return results;Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.