title: How to validate duplicate file upload in Angular
body: <p>I have here my sample code to validate duplicate file.
  This is my validation-service</p>
  <p>I have import { filter, size } from 'lodash'</p>
  <pre><code>const duplicateFile = ['file1', 'file2', 'file3'];
  const filteredValues = filter(file, {name: duplicateFile});
  const hasDuplicate = size(filteredValues) &gt; 1;
  
  if (hasDuplicate) { console.log ('duplicate') }
  else { console.log('no duplicate') }
  </code></pre>
  <p>File - uploaded files</p>
  <p>I tried this code but it's not working on my end.</p>