alfresco-pdf-toolkit icon indicating copy to clipboard operation
alfresco-pdf-toolkit copied to clipboard

"File name too long" Exception

Open tsiakmaki opened this issue 7 years ago • 0 comments

We have been using parts of your code, and recently we faced the above error.

When the document name in Alfresco was very large (e.g. >255 chars) we were getting AlfrescoRuntimeException : org.alfresco.error.AlfrescoRuntimeException .. ... "File name too long"

A fix that worked for us, was to use the nodeRef id also in the name of the temp document at: https://github.com/ntmcminn/alfresco-pdf-toolkit/blob/6b4a14bb22652fdd07b7b05efb121102a2ed9b84/pdf-toolkit-repo/src/main/java/org/alfresco/extension/pdftoolkit/service/PDFToolkitServiceImpl.java#L1448

e.g. File file = new File(toolkitTempDir, nodeRef.getId());

tsiakmaki avatar Sep 19 '17 11:09 tsiakmaki