<?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 File upload in Javascript with REST API in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/file-upload-in-javascript-with-rest-api/m-p/324770#M11771</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I use the automation API in javascript and I have to upload a file.
It works well with browsers that support XMLHttpRequest Level 2 but not with others as IE 8.&lt;/P&gt;
&lt;P&gt;In this case, I use an iframe ... and I have this:&lt;/P&gt;
&lt;H2&gt;Request&lt;/H2&gt;
&lt;P&gt;`Request URL: &lt;A href="http://localhost:8080/nuxeo/site/automation/Blob.Attach" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation/Blob.Attach&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Request Headers :&lt;/P&gt;
&lt;P&gt;Accept: text / html, application / xhtml + xml, application / xml; q = 0.9, * / * q = 0.8 &lt;BR /&gt;/&amp;gt;
Content-Type: application / x-www-form-urlencoded&lt;BR /&gt;/&amp;gt;
Origin: &lt;A href="http://localhost:8080" target="test_blank"&gt;http://localhost:8080&lt;/A&gt;&lt;BR /&gt;/&amp;gt;
Referer: &lt;A href="http://localhost:8080/nuxeo/site/pac/live-edit" target="test_blank"&gt;http://localhost:8080/nuxeo/site/pac/live-edit&lt;/A&gt;&lt;BR /&gt;/&amp;gt;
User-Agent: Mozilla/5.0 (X11 Linux i686) AppleWebKit/537.11 (KHTML, like Gecko) Safari/537.11 Chrome/23.0.1271.97&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Form Dataview URL encoded : &lt;BR /&gt;/&amp;gt;
jsondata: {"params": {"document": "4e2187b4-ecad-A01B-4bfe-4f6ede7d9a46"}, "context": {}}&lt;BR /&gt;/&amp;gt;
file: Eclipse-logo_small.jpg`&lt;/P&gt;
&lt;H2&gt;Response&lt;/H2&gt;
&lt;P&gt;Caused by: org.nuxeo.ecm.automation.InvalidChainException: Can not find any valid path in operation chain&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.buildChain (CompiledChainImpl.java: 147)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.compileChain (OperationServiceImpl.java: 207)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.compileChain (OperationServiceImpl.java: 200)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run (OperationServiceImpl.java: 81)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute (OperationResource.java: 42)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost (ExecutableResource.java: 56)&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;P&gt;I don't understand when I do a GET operation Blob.Attach, I have a response from the server with the description of the operation&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2013 19:27:35 GMT</pubDate>
    <dc:creator>gcusnieux_</dc:creator>
    <dc:date>2013-02-21T19:27:35Z</dc:date>
    <item>
      <title>File upload in Javascript with REST API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/file-upload-in-javascript-with-rest-api/m-p/324770#M11771</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I use the automation API in javascript and I have to upload a file.
It works well with browsers that support XMLHttpRequest Level 2 but not with others as IE 8.&lt;/P&gt;
&lt;P&gt;In this case, I use an iframe ... and I have this:&lt;/P&gt;
&lt;H2&gt;Request&lt;/H2&gt;
&lt;P&gt;`Request URL: &lt;A href="http://localhost:8080/nuxeo/site/automation/Blob.Attach" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation/Blob.Attach&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Request Headers :&lt;/P&gt;
&lt;P&gt;Accept: text / html, application / xhtml + xml, application / xml; q = 0.9, * / * q = 0.8 &lt;BR /&gt;/&amp;gt;
Content-Type: application / x-www-form-urlencoded&lt;BR /&gt;/&amp;gt;
Origin: &lt;A href="http://localhost:8080" target="test_blank"&gt;http://localhost:8080&lt;/A&gt;&lt;BR /&gt;/&amp;gt;
Referer: &lt;A href="http://localhost:8080/nuxeo/site/pac/live-edit" target="test_blank"&gt;http://localhost:8080/nuxeo/site/pac/live-edit&lt;/A&gt;&lt;BR /&gt;/&amp;gt;
User-Agent: Mozilla/5.0 (X11 Linux i686) AppleWebKit/537.11 (KHTML, like Gecko) Safari/537.11 Chrome/23.0.1271.97&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Form Dataview URL encoded : &lt;BR /&gt;/&amp;gt;
jsondata: {"params": {"document": "4e2187b4-ecad-A01B-4bfe-4f6ede7d9a46"}, "context": {}}&lt;BR /&gt;/&amp;gt;
file: Eclipse-logo_small.jpg`&lt;/P&gt;
&lt;H2&gt;Response&lt;/H2&gt;
&lt;P&gt;Caused by: org.nuxeo.ecm.automation.InvalidChainException: Can not find any valid path in operation chain&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.buildChain (CompiledChainImpl.java: 147)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.compileChain (OperationServiceImpl.java: 207)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.compileChain (OperationServiceImpl.java: 200)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run (OperationServiceImpl.java: 81)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute (OperationResource.java: 42)&lt;BR /&gt;/&amp;gt;
at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost (ExecutableResource.java: 56)&lt;BR /&gt;/&amp;gt;&lt;/P&gt;
&lt;P&gt;I don't understand when I do a GET operation Blob.Attach, I have a response from the server with the description of the operation&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2013 19:27:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/file-upload-in-javascript-with-rest-api/m-p/324770#M11771</guid>
      <dc:creator>gcusnieux_</dc:creator>
      <dc:date>2013-02-21T19:27:35Z</dc:date>
    </item>
  </channel>
</rss>

