title: How can I send another variable with FileReference Upload?
body: <p>I have a problem with the filereference class using the upload function.
  I want to send the <code>folderLocation</code> variable with <code>fileReference.upload()</code>.
  Below I try to describe my strategy.</p>
  
  <pre><code>var folderLocation : String = "photos/myUniqueFolder/";
  
  private var serverSideScript:String = "http://localhost/project/phpFlexMechanism/upload.php";
  urlRequest = new URLRequest(serverSideScript);
  
  fileReferenceList.addEventListener(Event.SELECT, fileSelectedHandler);
  
  private function fileSelectedHandler(event:Event):void {
  // upload the file to the server side script
          fileReference.addEventListener(Event.COMPLETE, uploadCompleteHandler);
          fileReference.upload(urlRequest);
  }
  </code></pre>
  
  <p>In PHP I use this to get the the file and uploaded</p>
  
  <pre><code>$folder = $_POST['folder'];
  
  $tempFile = $_FILES['Filedata']['tmp_name'];
  $fileName = $_FILES['Filedata']['name'];
  $fileSize = $_FILES['Filedata']['size'];
  
  move_uploaded_file($tempFile, "../user/$folder/uploadImages/" . $fileName);
  </code></pre>
  
  <p>But how can I send the <code>folder</code> through the "upload reference"?</p>