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:

/default-domain/workspaces/tst_faq/tst_onlinebank_noncard_f

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

4585 views

ANSWER



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?
04/29/2014

No there isn't. It's a new property introduced in 5.9.3 https://jira.nuxeo.com/browse/NXP-13649

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"

point=&quot;pathSegmentService&quot;&gt;
&lt;service class=&quot;xxx.xxx.xxx.MyPathSegmentService&quot; /&gt;

</extension>

04/29/2014

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?)
04/30/2014


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.
03/04/2014

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