File Name Character Limit

It appears to me as though the file name as it relates to the path is being truncated to 25 characters.

For example, we have a file named tst_onlinebank_noncard_faq.xml so its 30 characters, but when I view the object path it appears as:


But if I look at the CMIS properties the name is “correct” as follows:

cmis:name: tst_onlinebank_noncard_faq.xml

What this affects is searching for a file name by path we can’t find a matching entry as Nuxeo has truncated it.

0 votes

2 answers



Since 5.9.3, you'll be able to use the property nuxeo.path.segment.maxsize to set the max size of a path segment

1 votes

Is there a way to get this working on Nuxeo 5.8?

No there isn't. It's a new property introduced in 5.9.3

In 5.8 you have to implement your version of the interface PathSegmentService and contribute it with <extension target="org.nuxeo.ecm.core.api.pathsegment.PathSegmentService"

&lt;service class=&quot;; /&gt;



Thanks Thierry, It's working now :-). Maybe it is a possiblity to build a property for the workspace name length too. (I've did this myself now building a small plugin) (or do I need to create a new question for this?)

Looking at the nuxeo documentation the default doc id length is 24 (at least in the org.nuxeo.common.utils.IdUtils class document for 5.8). In the past I have overridden this (in java) with the following…

String docId = IdUtils.generateId(title, "-", true, 65);
docModel = session.createDocumentModel(folderDoc.getPathAsString(), docId, Resources.DOC1);

The docid is generated using “-” as the word separator, all in lower case, and up to 65 characters long). Docid is then used to create the document.

0 votes

Thanks, the trick for me is that I'm creating my documents remotely via the Apache Chemistry so I don't think there is a way to trick it into doing this.

The only thing I can think of is overriding the default action in Nuxeo through a custom contribution.