<?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 Obtain a file through webscript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/obtain-a-file-through-webscript/m-p/299855#M252985</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;I have created a webscript in the Web Script Extensions in my alfresco 3.0&amp;nbsp; community, so introducing the login, password and the node ref of the document, the web script should return the document in a pop up window of the browser&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the code of my script is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var scontent="@\\{http\\://&lt;A href="http://www.alfresco.org/model/content/1.0\\}content.mimetype:application/pdf" rel="nofollow noopener noreferrer"&gt;www.alfresco.org/model/content/1.0\\}content.mimetype:application/pdf&lt;/A&gt; + ";&lt;BR /&gt;var qnodeid="@sys\\:node-uuid:"+args.nId;&lt;BR /&gt;var strq=scontent+qnodeid;&lt;BR /&gt;&lt;BR /&gt;var content=search.luceneSearch(strq);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// Mostrar error al no encontrar el fichero&lt;BR /&gt;if (content.length != 1)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; status.code = 404;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; status.message = "File not found.";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; status.redirect = true;&lt;BR /&gt;}&lt;BR /&gt;model.fichero = content[0];&lt;BR /&gt;model.ticket = session.getTicket();&lt;BR /&gt;//model.nFact = args.nFact;&lt;BR /&gt;//model.cPro = args.cPro;&lt;BR /&gt;model.nId = args.nId;&lt;BR /&gt;model.strq = strq;&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;/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;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It uses to work fine, but today we have realized that for some documents that exists in the repository with node ref the webscript returns the 404 error message. Even making sure that the noderef id of the document we include in the url call it is fine and it is the one that is stored in Alfresco, the webscript returns this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2015 16:45:13 GMT</pubDate>
    <dc:creator>jlabuelo</dc:creator>
    <dc:date>2015-08-31T16:45:13Z</dc:date>
    <item>
      <title>Obtain a file through webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/obtain-a-file-through-webscript/m-p/299855#M252985</link>
      <description>Hi allI have created a webscript in the Web Script Extensions in my alfresco 3.0&amp;nbsp; community, so introducing the login, password and the node ref of the document, the web script should return the document in a pop up window of the browserthe code of my script isvar scontent="@\\{http\\://www.alfresco</description>
      <pubDate>Mon, 31 Aug 2015 16:45:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/obtain-a-file-through-webscript/m-p/299855#M252985</guid>
      <dc:creator>jlabuelo</dc:creator>
      <dc:date>2015-08-31T16:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain a file through webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/obtain-a-file-through-webscript/m-p/299856#M252986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be easier to assist you if you&amp;nbsp; can share generated logs here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Raghav Bhardwaj&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 05:06:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/obtain-a-file-through-webscript/m-p/299856#M252986</guid>
      <dc:creator>raghav_bhardwaj</dc:creator>
      <dc:date>2015-09-29T05:06:03Z</dc:date>
    </item>
  </channel>
</rss>

