You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to upload a file, using the batch upload, with a filename containing characters outside Ascii Hex [20,1E] , the Nuxeo Client throws an exception and the content ist not transmitted.
Here is the stack trace:
java.lang.IllegalArgumentException: Unexpected char 0xdc at 0 in X-File-Name value: Ümlaut.pdf
at okhttp3.Headers.checkValue(Headers.java:284)
at okhttp3.Headers$Builder.add(Headers.java:324)
at okhttp3.Request$Builder.addHeader(Request.java:196)
at retrofit2.RequestBuilder.addHeader(RequestBuilder.java:101)
at retrofit2.ParameterHandler$Header.apply(ParameterHandler.java:79)
at retrofit2.RequestFactory.create(RequestFactory.java:108)
at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:190)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:173)
at org.nuxeo.client.NuxeoClient.fetchResponse(NuxeoClient.java:274)
at org.nuxeo.client.objects.AbstractConnectable.fetchResponse(AbstractConnectable.java:65)
at org.nuxeo.client.objects.upload.BatchUpload.upload(BatchUpload.java:169)
at xxx.NuxeoAccess.testBatchUpload(NuxeoAccess.java:67)
The okhttp.checkValue method throws because it checks every char c of filename like this ((c <= '\u001f' && c != '\t') || c >= '\u007f')
So, I'd like to store Files in Nuxeo with filenames containing, for example, umlauts - basically every character that's supported in modern filesystem filenames - which seems as a rather unsurprising requirement for a content management system like Nuxeo.
But It seems I can't use the current BatchUpload API to achieve this.
Is that correct? Have you encountered this before?
The text was updated successfully, but these errors were encountered:
When trying to upload a file, using the batch upload, with a filename containing characters outside Ascii Hex [20,1E] , the Nuxeo Client throws an exception and the content ist not transmitted.
Here is the stack trace:
The okhttp.checkValue method throws because it checks every char c of filename like this
((c <= '\u001f' && c != '\t') || c >= '\u007f')
There is relevant discussion about that (overly restrictive) okhttp behaviour here: square/okhttp#2016 , especially square/okhttp#2016 (comment) - and okhttp offers https://square.github.io/okhttp/4.x/okhttp/okhttp3/-headers/-builder/add-unsafe-non-ascii/ to work around this.
So, I'd like to store Files in Nuxeo with filenames containing, for example, umlauts - basically every character that's supported in modern filesystem filenames - which seems as a rather unsurprising requirement for a content management system like Nuxeo.
But It seems I can't use the current BatchUpload API to achieve this.
Is that correct? Have you encountered this before?
The text was updated successfully, but these errors were encountered: