<?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 Overwriting existing content in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95228#M65314</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;SPAN&gt;Is there a way to overwrite the existing content with the same name ? I can search for the existing file and delete it before uploading the updated one. But is there a better way of doing it ? like a flag set to true for overwrite ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adnan &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Consultant | Object Consulting&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2007 01:53:23 GMT</pubDate>
    <dc:creator>ajaswal</dc:creator>
    <dc:date>2007-07-16T01:53:23Z</dc:date>
    <item>
      <title>Overwriting existing content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95228#M65314</link>
      <description>Hi,Is there a way to overwrite the existing content with the same name ? I can search for the existing file and delete it before uploading the updated one. But is there a better way of doing it ? like a flag set to true for overwrite ? Adnan Consultant | Object Consulting</description>
      <pubDate>Mon, 16 Jul 2007 01:53:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95228#M65314</guid>
      <dc:creator>ajaswal</dc:creator>
      <dc:date>2007-07-16T01:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting existing content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95229#M65315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Having the reference to your node file (reference)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ContentFormat contentFormat = new ContentFormat("text/plain", "UTF-8");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WebServiceFactory.getContentService().write(reference, Constants.PROP_CONTENT, "MY NEW CONTENT".getBytes(), contentFormat);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 08:57:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95229#M65315</guid>
      <dc:creator>alexcocia</dc:creator>
      <dc:date>2007-08-01T08:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting existing content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95230#M65316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to override content with the webclient, you need to take the update action instead of the addcontent action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So go to that document and click on update…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;friendly regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 09:01:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95230#M65316</guid>
      <dc:creator>xerox</dc:creator>
      <dc:date>2007-08-01T09:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting existing content</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95231#M65317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;public void actualizarArchivo(String id, String nombre, byte[] contenido, String mime, String encoding){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RepositoryServiceSoapBindingStub repositoryService = WebServiceClient.getRepositoryService(detail);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try {&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;ContentFormat contentFormat = new ContentFormat(mime, encoding);&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;&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;Reference actualizado = new Reference(STORE, id, null);&lt;/SPAN&gt;&lt;BR /&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;makeVersionable(repositoryService, actualizado);&lt;/SPAN&gt;&lt;BR /&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;ContentServiceSoapBindingStub contentService = WebServiceClient.getContentService(detail);&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;contentService.write(actualizado, Constants.PROP_CONTENT, contenido, contentFormat);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch (Exception e){&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;log.error("No se ha podido actualizar el archivo");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use this function to update an existing file, id is the node id, nombre the name of the file to update ex.("hi.txt"), contenido is the file content, and the mime and the encoding for the updated file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 10:28:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/overwriting-existing-content/m-p/95231#M65317</guid>
      <dc:creator>shyre</dc:creator>
      <dc:date>2007-09-05T10:28:56Z</dc:date>
    </item>
  </channel>
</rss>

