<?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: Download File Naming issue using 6.0.2v of alfresco in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/download-file-naming-issue-using-6-0-2v-of-alfresco/m-p/96707#M28363</link>
    <description>&lt;P&gt;It not quite clear what url you are using and what params are being sent for download request, are creating any custom download webscript or trying to use OOTB download api?&lt;/P&gt;
&lt;P&gt;For refrence to use OOTB download api you can look at this class:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/download/DownloadTest.java#L149" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/download/DownloadTest.java&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If correct url is used and all required params are passed, you should get the file with correct name always. Check the above class for example.&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;U&gt;REST API for download file/node is&lt;/U&gt;:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(It should be HTTP Get request)&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;GET /alfresco/service/api/node/content/{store_type}/{store_id}/{id}?a=false&amp;amp;alf_ticket={TICKET}&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/node/content/workspace/SpacesStore/85d2a84d-271b-41b1-9449-02f5942893a0?a=false&amp;amp;alf_ticket=TICKET_5550fa5e9b87bead8f008e906185e023b7ce21ed" target="_blank" rel="nofollow noopener noreferrer"&gt;h&lt;I&gt;ttp://127.0.0.1:8080/alfresco/service/api/node/content/workspace/SpacesStore/85d2a84d-271b-41b1-9449-02f5942893a0?a=false&amp;amp;a&lt;/I&gt;&lt;I&gt;lf_ticket=TICKET_5550fa5e9b87bead8f008e906185e023b7ce21ed&lt;/I&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;I&gt;Where:&amp;nbsp;&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;I&gt;&lt;STRONG&gt;a:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;means attach. if true, force download of content as attachment. Possible values are true/false&lt;/I&gt;&lt;BR /&gt;&lt;STRONG&gt;store_type:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;store_id:&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;SpacesStore&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;id:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;nodeRefId (UUID of the node)&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;A StoreRef is comprised of:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Store Protocol - that is, the type of store&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Store Identifier - the id of the store&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;I&gt;Example storeRefs are:&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;workspace://SpacesStore &amp;nbsp;(store_type://store_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;version://versionStore &amp;nbsp;(store_type://store_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;archive://SpacesStore &amp;nbsp;(store_type://store_id)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;This post shows example of custom download webscript:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://javaworld-abhinav.blogspot.com/2017/08/downloading-content-from-alfresco.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2017/08/downloading-content-from-alfresco.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2020 17:11:49 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-10-27T17:11:49Z</dc:date>
    <item>
      <title>Download File Naming issue using 6.0.2v of alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/download-file-naming-issue-using-6-0-2v-of-alfresco/m-p/96706#M28362</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;While downloading the file from Appliaction UI we are getting file name as&amp;nbsp; "eb3e60e5-ae30-4a7b-8321-8cd2dcf2b7b9"&amp;nbsp; instead of original file name as in alfresco like AS_ID.&lt;/P&gt;&lt;P&gt;this is my sample code written in java:&lt;/P&gt;&lt;P&gt;void dowload(DownloadRequest dr, HttpServletResponse hResponse){&lt;/P&gt;&lt;P&gt;CloseableHttpClient httpClient = HttpClientBuilder.create().build();&lt;BR /&gt;HttpGet httpGet = new HttpGet(dr.getUrlToDownload());&lt;BR /&gt;HttpResponse response = httpClient.execute(httpGet);&lt;BR /&gt;HttpEntity entity = response.getEntity();&lt;BR /&gt;if (entity != null) {&lt;BR /&gt;// code to read file content&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;hResponse.setHeader("Content-Disposition", "attachment; filename=\"" + dr.getFileName() + "\"");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;can anyone help me out how to download file with exact filename.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 16:14:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/download-file-naming-issue-using-6-0-2v-of-alfresco/m-p/96706#M28362</guid>
      <dc:creator>Aswani_Juvva</dc:creator>
      <dc:date>2020-10-27T16:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Download File Naming issue using 6.0.2v of alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/download-file-naming-issue-using-6-0-2v-of-alfresco/m-p/96707#M28363</link>
      <description>&lt;P&gt;It not quite clear what url you are using and what params are being sent for download request, are creating any custom download webscript or trying to use OOTB download api?&lt;/P&gt;
&lt;P&gt;For refrence to use OOTB download api you can look at this class:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/download/DownloadTest.java#L149" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-scripts/blob/master/src/main/java/com/github/abhinavmishra14/download/DownloadTest.java&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If correct url is used and all required params are passed, you should get the file with correct name always. Check the above class for example.&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;&lt;U&gt;REST API for download file/node is&lt;/U&gt;:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(It should be HTTP Get request)&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;GET /alfresco/service/api/node/content/{store_type}/{store_id}/{id}?a=false&amp;amp;alf_ticket={TICKET}&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://127.0.0.1:8080/alfresco/service/api/node/content/workspace/SpacesStore/85d2a84d-271b-41b1-9449-02f5942893a0?a=false&amp;amp;alf_ticket=TICKET_5550fa5e9b87bead8f008e906185e023b7ce21ed" target="_blank" rel="nofollow noopener noreferrer"&gt;h&lt;I&gt;ttp://127.0.0.1:8080/alfresco/service/api/node/content/workspace/SpacesStore/85d2a84d-271b-41b1-9449-02f5942893a0?a=false&amp;amp;a&lt;/I&gt;&lt;I&gt;lf_ticket=TICKET_5550fa5e9b87bead8f008e906185e023b7ce21ed&lt;/I&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;I&gt;Where:&amp;nbsp;&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;I&gt;&lt;STRONG&gt;a:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;means attach. if true, force download of content as attachment. Possible values are true/false&lt;/I&gt;&lt;BR /&gt;&lt;STRONG&gt;store_type:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;store_id:&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;SpacesStore&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;id:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;nodeRefId (UUID of the node)&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;A StoreRef is comprised of:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Store Protocol - that is, the type of store&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Store Identifier - the id of the store&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;I&gt;Example storeRefs are:&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;workspace://SpacesStore &amp;nbsp;(store_type://store_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;version://versionStore &amp;nbsp;(store_type://store_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;archive://SpacesStore &amp;nbsp;(store_type://store_id)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;This post shows example of custom download webscript:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://javaworld-abhinav.blogspot.com/2017/08/downloading-content-from-alfresco.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2017/08/downloading-content-from-alfresco.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 17:11:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/download-file-naming-issue-using-6-0-2v-of-alfresco/m-p/96707#M28363</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-10-27T17:11:49Z</dc:date>
    </item>
  </channel>
</rss>

