REST API create document uploaded file won't bind
Hi There,
I'm currently following the example on files upload and batch processing. (http://doc.nuxeo.com/display/public/NXDOC/REST+API)
Step one, creating a batch and uploading a file works
X-File-Name: testFile.txt, X-File-Idx:0, X-Batch-ID: mybatchid
Step two, I can see the file
http://localhost:8080/nuxeo/api/v1/automation/batch/files/mybatchid
Step three: a document is created, but the file is not bound to the document. I cannot find any errors :-(
This is the body:
{ “entity-type”: “document”, “name”:“NieuwDocument7”, “type”: “File”, “properties” : {
"dc:title":"NieuwDocument7", "file:content": { "upload-batch":"mybatchid", "upload-fileId":"0" }
} }
I'm running Nuxeo 5.8 on Windows 7.
Is there anything wrong with the REST Calls I'm making?
I'm trying this in order to create a new file from another webpage using javascript. Is there another REST call which I can use for this?
(page A – REST call –> create document including file in Nuxeo)
Thanks in advance, Bauke
There was a bug about batch binding in the REST-API affecting 5.8 : https://jira.nuxeo.com/browse/NXP-13417
It has been fixed since 5.9.1, and backported in 5.8-HF04