public function run()
 {
     foreach ($this->uploadedFiles as $uploadedFile) {
         $upload = new Upload($uploadedFile);
         $upload->setAllowOverwrite($this->allowOverwrite);
         $upload->setAllowedMimeTypes($this->allowedMimeType);
         $upload->setFileNewName($uploadedFile->getFileName());
         $upload->setTargetDirectory($this->targetDirectory, $this->createDirectory);
         $this->files[] = $upload->run();
         unset($upload);
     }
     return $this->files;
 }
 public function setTargetDirectory($directory, $create = true)
 {
     $this->upload->setTargetDirectory($directory, $create);
 }