11-07-2016 09:42 AM
Hello, I am trying to upload a file using the java automation client :
FileBlob blob = (FileBlob) session.getFile(path); session.newRequest("Blob.Attach").setHeader(Constants.HEADER_NX_VOIDOP, "true").setInput(blob) .set("document", document.getPath().toString()).execute();
The file uploads fine, but doesnt keep his original name, instead, the file in the nuxeo server was uploaded as nx-automation-upload-xxxxxxxxxxx.tmp. All files i tried to upload are renamed with the prefix nx-automation-upload- and a .tmp extension.
Is there a way to upload files keeping original names and extensions on server?
11-08-2016 10:13 AM
I managed to do it :
document.set("file:filename",name); document = (Document) session.newRequest("Document.Update").setHeader(Constants.HEADER_NX_SCHEMAS, "*").setInput(document).set("properties", document).execute();
It works when I create a specific type of document (Picture, video, etc.) but not when I create a file, even if I put a picture in it for example. Anyone knows why ?
Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.
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.