<?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: How to get a blob image with cURL? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325084#M12085</link>
    <description>&lt;P&gt;Why the `Content-Type&lt;/P&gt;</description>
    <pubDate>Wed, 23 May 2012 15:21:37 GMT</pubDate>
    <dc:creator>Florent_Guillau</dc:creator>
    <dc:date>2012-05-23T15:21:37Z</dc:date>
    <item>
      <title>How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325079#M12080</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;
&lt;P&gt;We are Nuxeo ECM total rookies. We have defined a document model in our ECM instance, and this model contains a blob "illustration" attribute, which enables to store an image.&lt;/P&gt;
&lt;P&gt;When looking at the rendering page which of that document model, when the blob attribute has been fulfilled with a picture, the image is diplayed in ECM with an hyperlink like "http://localhost:8080/nuxeo/nxfile/default/351993be-1ee6-43c1-b081-709a519f665c/as:illustration/image.png".&lt;/P&gt;
&lt;P&gt;We strive to download that image from the command line with cURL with the command 'curl -H 'Content-Type:application/json+nxrequest' -u:Administrator:Administrator "http://localhost:8080/nuxeo/nxfile/default/351993be-1ee6-43c1-b081-709a519f665c/as:illustration/image.png"', authenticated properly, but this command returns an empty stream. Eventually, we will achieve that download from a Java application, which cannot use the Automation client, because we run in a Google App Engine box.&lt;/P&gt;
&lt;P&gt;However, we thought that we had followed the documentation available at "http://doc.nuxeo.com/display/NXDOC55/Using+cURL", but we must have missed something. I need to mention that, if we open a browser with the URL "http://localhost:8080/nuxeo/nxfile/default/351993be-1ee6-43c1-b081-709a519f665c/as:illustration/image.png", the browser proposes to open or save the file.&lt;/P&gt;
&lt;P&gt;If someone could help us to work this out, we would be grateful. Thank you for your attention.&lt;/P&gt;
&lt;P&gt;Regards,
Édouard&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2012 22:50:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325079#M12080</guid>
      <dc:creator>Édouard_Mercier</dc:creator>
      <dc:date>2012-05-22T22:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325080#M12081</link>
      <description>&lt;P&gt;This is most probably because you have a syntax error in your command:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;curl -H
'Content-Type:application/json+nxrequest'
-u:Administrator:Administrator "http://localhost:8080/nuxeo/nxfile/default/351993be-1ee6-43c1-b081-709a519f665c/as:illustration/image.png"&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please note there should be a space instead of the colon between -u and Administrator to have the following instead:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;-u Administrator:Administrator&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 22 May 2012 23:31:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325080#M12081</guid>
      <dc:creator>Wojciech_Sulejm</dc:creator>
      <dc:date>2012-05-22T23:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325081#M12082</link>
      <description>&lt;P&gt;Thank you Wojciech. Shame on me, I must be too tired! It now works lit a charm. Regards, Édouard&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 09:16:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325081#M12082</guid>
      <dc:creator>Édouard_Mercier</dc:creator>
      <dc:date>2012-05-23T09:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325082#M12083</link>
      <description>&lt;P&gt;Just an after thought, running&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;curl -I -H 'Content-Type:application/json+nxrequest' "http://localhost:8080/nuxeo/nxfile/default/351993be-1ee6-43c1-b081-709a519f665c/as:illustration/image.png"
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;actually returns the right HTTP status,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;HTTP/1.1 302 D?plac? Temporairement
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=5D57191A544CCA6D6BA5442672954DA8.nuxeo; Path=/nuxeo
Location: &lt;A href="http://localhost:8080/nuxeo/login.jsp?requestedUrl=nxfile%252Fdefault%252F351993be-1ee6-43c1-b081-709a519f665c%252Fas%253Aillustration%252Fimage.png" target="test_blank"&gt;http://localhost:8080/nuxeo/login.jsp?requestedUrl=nxfile%252Fdefault%252F351993be-1ee6-43c1-b081-709a519f665c%252Fas%253Aillustration%252Fimage.png&lt;/A&gt;
Content-Length: 0
Date: Wed, 23 May 2012 07:31:22 GMT
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which accounts for the credential issue &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; Maybe, a "forbidden" status would be better...&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 09:37:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325082#M12083</guid>
      <dc:creator>Édouard_Mercier</dc:creator>
      <dc:date>2012-05-23T09:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325083#M12084</link>
      <description>&lt;P&gt;This is done on purpose, we redirect to the login page so that an unauthenticated user that follows the link is asked to authenticate first.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 15:21:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325083#M12084</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2012-05-23T15:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325084#M12085</link>
      <description>&lt;P&gt;Why the `Content-Type&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 15:21:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325084#M12085</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2012-05-23T15:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a blob image with cURL?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325085#M12086</link>
      <description>&lt;P&gt;Right the "Content-Type" is misleading and unnecessary.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2012 16:17:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-get-a-blob-image-with-curl/m-p/325085#M12086</guid>
      <dc:creator>Édouard_Mercier</dc:creator>
      <dc:date>2012-05-23T16:17:44Z</dc:date>
    </item>
  </channel>
</rss>

