private function buildData($originalName, $extension)
    {
        $tmpDirectory = $this->getApplication()->getTemporaryDir();
        $fileName = md5($originalName . uniqid('', true)) . '.' . $extension;

        $data = [
            'originalname' => $originalName,
            'path'         => $tmpDirectory . DIRECTORY_SEPARATOR . $fileName,
            'filename'     => $fileName
        ];

        return $data;
    }
private function buildData($originalName, $extension)
    {
        $tmpDirectory = $this->getApplication()->getTemporaryDir();
        $fileName = md5($originalName . uniqid('', true)) . '.' . $extension;

        $data = [
            'originalname' => $originalName,
            'path'         => $tmpDirectory . DIRECTORY_SEPARATOR . $fileName,
            'filename'     => $fileName
        ];

        return $data;
    }
private function buildData ( $ originalName , $ extension ) { $ tmpDirectory = $ this -> getApplication ( ) -> getTemporaryDir ( ) ; $ fileName = md5 ( $ originalName . uniqid ( '' , true ) ) . '.' . $ extension ; $ data = [ 'originalname' => $ originalName , 'path' => $ tmpDirectory . DIRECTORY_SEPARATOR . $ fileName , 'filename' => $ fileName ] ; return $ data ; }
Build data for retrieve into the content of response

@param String $originalName
@param String $extension
@return Array $data
Build data for retrieve into the content of response