title: How to Rename the filename before uploading to s3 bucket ?angular file upload
body: <p>I have set file to be uploaded in s3 bucket,I need to add timestamp before file extension. I m working this code in angular 8 .
  this is the method I'm using.</p>
  <pre><code>onFileChange(files: FileList) {
  
  for (let fItr in files) {
  if (fItr != 'length' &amp;&amp; fItr != 'item') {
  // var fileExtension = '.' + files[fItr].name.split('.').pop();
  // files[fItr].name= Math.random().toString(36).substring(7) + new Date().getTime() + fileExtension;
  this.attachment.push(files[fItr]);
  this.fileToUpload.push(files.item(parseInt(fItr)));
  </code></pre>
  <p>}</p>
  <p>sample input</p>
  <pre><code>crawlling.php
  fileupload.csv
  fileupload.pptx
  loading.mp4
  </code></pre>
  <p>sample output (i need the files to be uploaded like this)</p>
  <pre><code>crawlling_20180215022222.php
  fileupload_20190419062612.csv
  fileupload_20200419082612.pptx
  loading_20180910081329.mp4
  </code></pre>