05-28-2013 02:44 PM
Hi,
Is it possible to attach a file to a document by sending a POST request to http://localhost:8080/nuxeo/restAPI/default/07e47804-db53-4598-8a0a-427749c6e762/file/upload, where '07e47804-db53-4598-8a0a-427749c6e762' is the docid and 'file' is what I'd like the file stored as.
When I try to send this request, I get the following error in my log:
2013-05-27 15:45:28,918 ERROR [org.nuxeo.ecm.webapp.security.UserSessionBean] Can not fetch user principal from FacesContext: there is no FacesContext attached to the current request 2013-05-27 15:45:28,919 ERROR [org.nuxeo.ecm.webapp.security.UserSessionBean] Can not fetch user principal from FacesContext: there is no FacesContext attached to the current request 2013-05-27 15:45:28,919 ERROR [org.nuxeo.ecm.webapp.filemanager.FileManageActionsBean] Error importing DMS_Review.txt org.nuxeo.ecm.core.api.ClientException: Cannot create document of type Note in container with type SectionRoot .
I'm guessing this is because there is no user authentication. How could I do this properly?
Thanks.
05-28-2013 04:45 PM
I suggest you to use the automation REST as this one is deprecated:
http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client?desktop=true
05-28-2013 04:45 PM
I suggest you to use the automation REST as this one is deprecated:
http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client?desktop=true
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.