<?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: WebScript to retrieve the content of a given document? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150356#M105239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;A href="http://localhost:8080/alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach&lt;/A&gt;?}&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;can anyone please give a sample url to retrieve the content of a document. how do we know the node id,store id, store type and property..?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2008 12:27:12 GMT</pubDate>
    <dc:creator>madhu2710</dc:creator>
    <dc:date>2008-11-25T12:27:12Z</dc:date>
    <item>
      <title>WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150350#M105233</link>
      <description>Is there a default Web Script that allows to retrieve - as the native byte stream with MIME-type - the content of a document?Is it mabye the following?http://localhost:8080/alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach?}This seems useful to retrieve a prope</description>
      <pubDate>Thu, 03 Jul 2008 08:33:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150350#M105233</guid>
      <dc:creator>theorbix</dc:creator>
      <dc:date>2008-07-03T08:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150351#M105234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes that is it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example to get a url for viewing back from a webscript in a ftl file where d is a script node for a doc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ${absurl(url.serviceContext)}/api/node/content/${d.nodeRef.storeRef.protocol}/${d.nodeRef.storeRef.identifier}/${c.nodeRef.id}/${c.name?url}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from flexspaces integratedsemantics/folderlist/folderlist.get.xml.ftl web script &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the ?url in the name is to encode any spaces etc in the name&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to get mimetype you can use&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;d.mimetype&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 17:44:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150351#M105234</guid>
      <dc:creator>stevereiner</dc:creator>
      <dc:date>2008-07-03T17:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150352#M105235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Steve for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that FlexSpaces does exactly what we're trying to do in our custom application (for a customer, we need to develop a custom web client, muuuuch simpler and less interactive than FlexSpaces &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp; ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you provide a basic example of the WebScript URL syntax that should be used? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've not understood at all how we should use the ?url parameter and how to be sure to receive the document in it's native format… you mention a "ftl file" but I don't understand what you mean with this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also not understood the meaning of the optional a={attach?} parameter… &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know these are classic questions from a newbie, and I know that you've been working on FlexSpaces for months so now you're very familiar with the development of applications that use JavaScript-based and Java-backed Web Scripts…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 17:53:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150352#M105235</guid>
      <dc:creator>theorbix</dc:creator>
      <dc:date>2008-07-03T17:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150353#M105236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ftl = freemarker template&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;?url is a freemarker builtin to escape character in the file name on a url, not anything about the content itself&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://freemarker.org/docs/ref_builtins_string.html" rel="nofollow noopener noreferrer"&gt;http://freemarker.org/docs/ref_builtins_string.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I showed before was example in a webscript that you call and gives you back a url&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you just want to call the url assuming you have something in the main "company home" store and not in a avm or 3.0 collab site:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{http}://{host}:{port}/alfresco/service/api/node/content/workspace/SpacesStore/{node_id}/{node_name_encoded}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the optional a=true attachment arg will do the following in the java code for the webscript&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set header based on filename - will force a Save As from the browse if it doesn't recognize it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this is better than the default response of the browser trying to display the contents&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; httpRes.setHeader("Content-Disposition", "attachment");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS Components from FlexSpaces can be used to have a simpler ui. Also I going to work on allowing you to make things simpler or different, view columns, properties for custom types,&amp;nbsp; via&amp;nbsp; xml configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 19:07:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150353#M105236</guid>
      <dc:creator>stevereiner</dc:creator>
      <dc:date>2008-07-03T19:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150354#M105237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;ftl = freemarker template&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I know… but what I did not understand was the need of using a Freemarker script within the Web Script. Are you talking about a custom Web Script? In this case, could you post the whole Web Script implementation (definition, .js and .ftl files) so I'll understand the overall logic? That would be great… &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or maybe you were talking about one of the built-in web scripts, but in this case I'm a bit lost…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What I showed before was example in a webscript that you call and gives you back a url&lt;BR /&gt;If you just want to call the url assuming you have something in the main "company home" store and not in a avm or 3.0 collab site:&lt;BR /&gt;{http}://{host}:{port}/alfresco/service/api/node/content/workspace/SpacesStore/{node_id}/{node_name_encoded}&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, this looks exactly what I need. With {node_name_encoded} you mean the document name attribute?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to pass the document unique node id?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;the optional a=true attachment arg will do the following in the java code for the webscript&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set header based on filename - will force a Save As from the browse if it doesn't recognize it&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this is better than the default response of the browser trying to display the contents&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; httpRes.setHeader("Content-Disposition", "attachment");&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, this makes sense… useful.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 19:41:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150354#M105237</guid>
      <dc:creator>theorbix</dc:creator>
      <dc:date>2008-07-03T19:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150355#M105238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"Or maybe you were talking about one of the built-in web scripts" (in the builtin sample webscript package) see&amp;nbsp; folder.get.html.ftl&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts_Examples#Folder_Browse.2FRSS_Feed" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts_Examples#Folder_Browse.2FRSS_Feed&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Ok, this looks exactly what I need. With {node_name_encoded} you mean the document name attribute?"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Is there a way to pass the document unique node id?"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; need to pass both node id and node name&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2008 19:58:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150355#M105238</guid>
      <dc:creator>stevereiner</dc:creator>
      <dc:date>2008-07-03T19:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150356#M105239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;A href="http://localhost:8080/alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach&lt;/A&gt;?}&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;can anyone please give a sample url to retrieve the content of a document. how do we know the node id,store id, store type and property..?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 12:27:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150356#M105239</guid>
      <dc:creator>madhu2710</dc:creator>
      <dc:date>2008-11-25T12:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: WebScript to retrieve the content of a given document?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150357#M105240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Madhu,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to get hold of "node".&amp;nbsp; This you can get by the help of lucene to your file in the repository.&amp;nbsp; Then you can use following syntax to download the file&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/alfresco/service/api/node/content/${node.nodeRef.storeRef.protocol}/${node.nodeRef.storeRef.identifier}/${node.nodeRef.id}/${node.name?url" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/api/node/content/${node.nodeRef.storeRef.protocol}/${node.nodeRef.storeRef.identifier}/${node.nodeRef.id}/${node.name?url&lt;/A&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kayan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 10:56:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-to-retrieve-the-content-of-a-given-document/m-p/150357#M105240</guid>
      <dc:creator>kayan</dc:creator>
      <dc:date>2009-01-28T10:56:17Z</dc:date>
    </item>
  </channel>
</rss>

