<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Attach file to Document through REST API in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/attach-file-to-document-through-rest-api/m-p/316916#M3917</link>
    <description>&lt;P&gt;I suggest you to use the automation REST as this one is deprecated:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client?desktop=true" target="test_blank"&gt;http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client?desktop=true&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2013 20:45:37 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2013-05-28T20:45:37Z</dc:date>
    <item>
      <title>Attach file to Document through REST API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/attach-file-to-document-through-rest-api/m-p/316915#M3916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is it possible to attach a file to a document by sending a POST request to &lt;A href="http://localhost:8080/nuxeo/restAPI/default/07e47804-db53-4598-8a0a-427749c6e762/file/upload" target="test_blank"&gt;http://localhost:8080/nuxeo/restAPI/default/07e47804-db53-4598-8a0a-427749c6e762/file/upload&lt;/A&gt;,
where '07e47804-db53-4598-8a0a-427749c6e762' is the docid and 'file' is what I'd like the file stored as.&lt;/P&gt;
&lt;P&gt;When I try to send this request, I get the following error in my log:&lt;/P&gt;
&lt;P&gt;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
.&lt;/P&gt;
&lt;P&gt;I'm guessing this is because there is no user authentication. How could I do this properly?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 18:44:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/attach-file-to-document-through-rest-api/m-p/316915#M3916</guid>
      <dc:creator>sk90_</dc:creator>
      <dc:date>2013-05-28T18:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Attach file to Document through REST API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/attach-file-to-document-through-rest-api/m-p/316916#M3917</link>
      <description>&lt;P&gt;I suggest you to use the automation REST as this one is deprecated:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client?desktop=true" target="test_blank"&gt;http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client?desktop=true&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 20:45:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/attach-file-to-document-through-rest-api/m-p/316916#M3917</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2013-05-28T20:45:37Z</dc:date>
    </item>
  </channel>
</rss>

