<?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 Upload Problem(prevent a new copy of an existing file) in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10758#M4764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m using Alfresco Community 5.2. I have some problems about uploading same named documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I have a document called "test.doc". If a file with the same name is uploaded into the same area, Alfresco created another file "test-1.doc" by default.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could give an error message instead (like - document already exist -)? Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me..&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&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;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Aug 2017 13:35:44 GMT</pubDate>
    <dc:creator>hilal</dc:creator>
    <dc:date>2017-08-11T13:35:44Z</dc:date>
    <item>
      <title>Upload Problem(prevent a new copy of an existing file)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10758#M4764</link>
      <description>Hi all,I m using Alfresco Community 5.2. I have some problems about uploading same named documents.For example, I have a document called "test.doc". If a file with the same name is uploaded into the same area, Alfresco created another file "test-1.doc" by default.&amp;nbsp;Could give an error message instead</description>
      <pubDate>Fri, 11 Aug 2017 13:35:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10758#M4764</guid>
      <dc:creator>hilal</dc:creator>
      <dc:date>2017-08-11T13:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Problem(prevent a new copy of an existing file)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10759#M4765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is quite a detail of the default Share user interface, and it is not something that provides a simple configuration to switch. There is also &lt;A href="https://github.com/Alfresco/share/blob/0e6a7efa2c8c3e239846aac395d7a8c2ea50fa67/share/src/main/webapp/components/upload/dnd-upload.js#L995" rel="nofollow noopener noreferrer"&gt;some&amp;nbsp;logic involved&lt;/A&gt;&amp;nbsp;to determine if the name should be adapted or not. To prevent the renaming you'd have to make sure that the "showConfig.updateFilename" setting is never set to "true". Since the showConfig is usually provided from the code to trigger the upload, you might have to check/change in multiple sources (including 3rd-party addons that might provide a custom upload action/UI) to check that every instance is&amp;nbsp;configured to your preference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you'd have to override the default upload web script to eliminate the &lt;A href="https://github.com/Alfresco/community-edition-old/blob/2c1eff9953d3105e738f7b06ba9ba8a079ca4c24/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js#L275" rel="nofollow noopener noreferrer"&gt;code that handles the rename&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 13:56:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10759#M4765</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-08-11T13:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Problem(prevent a new copy of an existing file)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10760#M4766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed&amp;nbsp;scope.showConfig.updateFilename as false in dnd-upload.js file. But nothing changed in my documents. I m giving my added line on code in dnd-upload.js file. How can I do ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;var fileName = file.name,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;updateNameAndMimetype = false;&lt;BR /&gt; scope.showConfig.updateFilename = false; &amp;nbsp;&lt;STRONG&gt;//I added this line&lt;/STRONG&gt;&lt;BR /&gt; if (!!scope.showConfig.newVersion &amp;amp;&amp;amp; scope.showConfig.updateFilename &amp;amp;&amp;amp; scope.showConfig.updateFilename !== fileName)&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;updateNameAndMimetype = true;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 14:34:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-problem-prevent-a-new-copy-of-an-existing-file/m-p/10760#M4766</guid>
      <dc:creator>hilal</dc:creator>
      <dc:date>2017-08-11T14:34:40Z</dc:date>
    </item>
  </channel>
</rss>

