title: Putting name while importing a file
body: <p>I want to give a custom name to the file which i want to import. So in the import page i have two text field <code>&lt;input type='text' name='f[]' value='http://'&gt;|&lt;input type='text' name='n[]'&gt;</code>.
  When i put only the url of the file in the text area without putting any name, the file is uploaded and the file takes the basename of the url. But i want to give a custom name to the file while uploading it. So to do this when i put the url of the file and my own custom name in the two text field, some different name is coming like "file_0.dat". I have tried to get the name using $_POST[n], but it didnt work. I am sharing a part of the import action script. Please help me in this regard.</p>
  
  <pre><code>$i=0;
  
      if(trim($_POST['n'][$i]) == '')
          $_name = preg_match("~(.*)\.(\w)~i",basename($f)) ? basename($f) : "file_$i.dat";
      else
          $_name = preg_match("~(.*)\.(\w)~i",basename($_POST['n'][$i])) ? basename($_POST['n'][$i]) : "file_$i.dat";
  </code></pre>