<?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 send webscript response as file (file download box) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247374#M200504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One more question, How my desc.xml looks like then ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example like : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;webscript&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;shortname&amp;gt;Export Search Results&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;description&amp;gt;Export Searching result in Advance Search&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/repository/exportcsv&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;format default="json"&amp;gt;&amp;lt;/format&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;authentication&amp;gt;user&amp;lt;/authentication&amp;gt;&lt;BR /&gt;&amp;lt;/webscript&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;for file how it should be?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2012 12:42:48 GMT</pubDate>
    <dc:creator>g_rathod</dc:creator>
    <dc:date>2012-03-23T12:42:48Z</dc:date>
    <item>
      <title>How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247370#M200500</link>
      <description>Hi,In alfresco 4 share enterprise, When I perform advance search, I place one more button called "Export Search", when search result gives me nodes (searched results).e.g. Let say I got 5 results. Following are the steps I performed.1) Get 5 nodeRefs from client side search.js2) Calling repo side we</description>
      <pubDate>Fri, 23 Mar 2012 09:45:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247370#M200500</guid>
      <dc:creator>g_rathod</dc:creator>
      <dc:date>2012-03-23T09:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247371#M200501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Make sure you get your webscript to set the "Content-Disposition" header to something like "attachment; filename=MyExcelDoc.xls".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As reference take a look at the org.alfresco.repo.web.scripts.content.StreamContent &amp;amp; org.alfresco.repo.web.scripts.content.ContentGet classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers, Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 10:05:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247371#M200501</guid>
      <dc:creator>erikwinlof</dc:creator>
      <dc:date>2012-03-23T10:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247372#M200502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for quick reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I am using "extends DeclarativeWebScript" so response is not available in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry but I could not understand from given example you have suggested. Is there any more snippet which is used in DeclarativeWebscript ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 11:24:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247372#M200502</guid>
      <dc:creator>g_rathod</dc:creator>
      <dc:date>2012-03-23T11:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247373#M200503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Then I would suggest you extend the org.alfresco.repo.web.scripts.content.StreamContent instead of DeclarativeWebscript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at how the org.alfresco.repo.web.scripts.content.ContentGet as an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;:: Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 11:33:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247373#M200503</guid>
      <dc:creator>erikwinlof</dc:creator>
      <dc:date>2012-03-23T11:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247374#M200504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One more question, How my desc.xml looks like then ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example like : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;webscript&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;shortname&amp;gt;Export Search Results&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;description&amp;gt;Export Searching result in Advance Search&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/repository/exportcsv&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;format default="json"&amp;gt;&amp;lt;/format&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;authentication&amp;gt;user&amp;lt;/authentication&amp;gt;&lt;BR /&gt;&amp;lt;/webscript&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;for file how it should be?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 12:42:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247374#M200504</guid>
      <dc:creator>g_rathod</dc:creator>
      <dc:date>2012-03-23T12:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247375#M200505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take a look at the desc file for ContentGet.java:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/cmis/content.get.desc.xml" rel="nofollow noopener noreferrer"&gt;http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/cmis/content.get.desc.xml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should for example change your &amp;lt;format&amp;gt; declaration, to i.e.&amp;nbsp; &amp;lt;format default=""&amp;gt;argument&amp;lt;/format&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers, Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 12:54:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247375#M200505</guid>
      <dc:creator>erikwinlof</dc:creator>
      <dc:date>2012-03-23T12:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247376#M200506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually this helps. currently in declarative webscript,I thought of writing that csv file in same webscript class to some temp location.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and thought to send it as response. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I have two things remaining like how to write a file (temparary location tomcat/temp) and send stream as response locating our file, as you suggested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so currently being stuck at this stage.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 13:00:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247376#M200506</guid>
      <dc:creator>g_rathod</dc:creator>
      <dc:date>2012-03-23T13:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247377#M200507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please take a look at the ContentGet implementation, in there you will be able to see how its done. I.e. look at&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected void streamContent(WebScriptRequest req, WebScriptResponse res, File file, Long modifiedTime, boolean attach, String attachFileName) throws IOException&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to see who streaming from a file is done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers and good luck, Erik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 13:09:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247377#M200507</guid>
      <dc:creator>erikwinlof</dc:creator>
      <dc:date>2012-03-23T13:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247378#M200508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, but what my option is, see when internally I am creating a file can't we expose it directly, here ContentGet implementation seems we need to first store it in alfresco repository and then populating stuffs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;because what I have in return of webscript is File object thats it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As per implementation I saw in ContentGet is following :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have checked &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;protected void streamContent(WebScriptRequest req, WebScriptResponse res, File file, Long modifiedTime, boolean attach, String attachFileName) throws IOException&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; which is also requiring following :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) resourcePath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) attach&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) attachFileName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually as I have only File to return.&amp;nbsp; with No StreamId/ content props/attach….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;!– by object id –&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/cmis/i/{id}/content{property}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/cmis/s/{store}/i/{id}/content{property}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;!– by path –&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/cmis/p{path}/content{property}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/cmis/s/{store}/p{path}/content{property}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;!– alfresco style –&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/api/path/content{property}/{store_type}/{store_id}/{nodepath}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/api/avmpath/content{property}/{store_id}/{avmpath}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/api/node/{store_type}/{store_id}/{id}/content{property}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/api/path/{store_type}/{store_id}/{nodepath}/content{property}?a={attach?}&amp;amp;amp;streamId={streamId?}&amp;lt;/url&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 06:22:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247378#M200508</guid>
      <dc:creator>g_rathod</dc:creator>
      <dc:date>2012-03-26T06:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247379#M200509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Erik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally I am able to use StreamContent as you said.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;streamContent(req, res, tempFile, true, tempFile.getName());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where tempFile =&amp;nbsp; file Object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;true = attachment boolean&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;but sadly it wont show me save As or download box.&lt;/STRONG&gt;&lt;SPAN&gt; inside tomcat no other errors are there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even using streamContent, do I need to set following ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;res.setContentType("application/csv");&lt;BR /&gt;res.setHeader("content-disposition","filename=test.csv");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can't we download content without storing it to alfresco repository ???. It is currently stored in my alfresco/tomcat/temp&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 13:40:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247379#M200509</guid>
      <dc:creator>g_rathod</dc:creator>
      <dc:date>2012-03-26T13:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247380#M200510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ghanshyam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have similar kind of issue, did you resolved that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am storing file in tomcat/temp&amp;nbsp; but&amp;nbsp; streamContent would not expose file to share side as download prompt.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 10:28:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247380#M200510</guid>
      <dc:creator>power</dc:creator>
      <dc:date>2012-03-27T10:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247381#M200511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;were you able to resolve this, coz i am doing the same thing to export file from Share. I tried with declarative webscript and Content Stream but i am not getting content pop-up to save/save-as file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;please provide your inputs, that will be really help full.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 13:21:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247381#M200511</guid>
      <dc:creator>alfsender</dc:creator>
      <dc:date>2013-01-08T13:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247382#M200512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi, we're trying to the same as well. Has anyone got this down yet? we're using alfresco share 4.0.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2013 05:31:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247382#M200512</guid>
      <dc:creator>grg021</dc:creator>
      <dc:date>2013-03-06T05:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247383#M200513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you tell me how did you put a button to export advanced search results on the results screen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 16:43:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247383#M200513</guid>
      <dc:creator>mgupta</dc:creator>
      <dc:date>2013-05-20T16:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247384#M200514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check this one out: &lt;/SPAN&gt;&lt;A href="https://wiki.alfresco.com/wiki/3.0_Web_Scripts_Kinds" rel="nofollow noopener noreferrer"&gt;https://wiki.alfresco.com/wiki/3.0_Web_Scripts_Kinds&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 17:44:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247384#M200514</guid>
      <dc:creator>aleksczajka</dc:creator>
      <dc:date>2014-11-27T17:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to send webscript response as file (file download box)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247385#M200515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;in case anyone still needs a response to this, here's how i did it…. all you need is a name.get.js and name.get.desc.xml and place them into your webScripts directory in Alfresco Share&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;name.get.desc.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;three things to pay attention to: 1. "kind" attribute on the &amp;lt;webscript&amp;gt; tag, 2. empty "default" attribute on the &amp;lt;format&amp;gt; tag, 3. "required" content for the &amp;lt;transaction&amp;gt; tag&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;webscript kind="org.alfresco.repository.content.stream"&amp;gt; &lt;BR /&gt;&amp;lt;shortname&amp;gt;return file&amp;lt;/shortname&amp;gt; &lt;BR /&gt;&amp;lt;description&amp;gt;return a file&amp;lt;/description&amp;gt; &lt;BR /&gt;&amp;lt;url&amp;gt;/name/return/{name}url&amp;gt; &lt;BR /&gt;&amp;lt;format default=""&amp;gt;extension&amp;lt;/format&amp;gt; &lt;BR /&gt;&amp;lt;authentication&amp;gt;guest&amp;lt;/authentication&amp;gt; &lt;BR /&gt;&amp;lt;transaction&amp;gt;required&amp;lt;/transaction&amp;gt;&lt;BR /&gt;&amp;lt;/webscript&amp;gt; &lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;name.get.js&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I search for my file first by name, but, you can search on other things as well, tags, internal columns, categories, text, etc. Just take a look into luceneSearch&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;// perform search&lt;BR /&gt;var nodes = search.luceneSearch("@cm\\:name:\""+url.extension+".xml\"");&lt;BR /&gt;&lt;BR /&gt;//stream the first document&lt;BR /&gt;model.contentNode = nodes[0];&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and that's it&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 17:55:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-send-webscript-response-as-file-file-download-box/m-p/247385#M200515</guid>
      <dc:creator>aleksczajka</dc:creator>
      <dc:date>2014-11-27T17:55:00Z</dc:date>
    </item>
  </channel>
</rss>

