public function upload()
    {
        $file = Input::file($this->field);
        if ( ! $this->validate($file)) {
            return false;
        }

        $originalFileName  = $file->getClientOriginalName();
        $encryptedFileName = $this->getUniqueFilename($originalFileName);
        $mimeType          = $file->getMimeType();

        $size = $file->getSize();
        if ($file->move($this->getDestination(), $encryptedFileName)) {
            $this->uploadedFileInfo = [
                $this->originalImageNameField => $originalFileName,
                $this->field                  => $encryptedFileName,
                $this->uploadDir              => $this->getUploadPath(),
                'size'                        => $size,
                'extension'                   => $file->getClientOriginalExtension(),
                'mime_type'                   => $mimeType,
            ];

            return true;
        }

        return false;
    }
public function upload()
    {
        $file = Input::file($this->field);
        if ( ! $this->validate($file)) {
            return false;
        }

        $originalFileName  = $file->getClientOriginalName();
        $encryptedFileName = $this->getUniqueFilename($originalFileName);
        $mimeType          = $file->getMimeType();

        $size = $file->getSize();
        if ($file->move($this->getDestination(), $encryptedFileName)) {
            $this->uploadedFileInfo = [
                $this->originalImageNameField => $originalFileName,
                $this->field                  => $encryptedFileName,
                $this->uploadDir              => $this->getUploadPath(),
                'size'                        => $size,
                'extension'                   => $file->getClientOriginalExtension(),
                'mime_type'                   => $mimeType,
            ];

            return true;
        }

        return false;
    }
public function upload ( ) { $ file = Input :: file ( $ this -> field ) ; if ( ! $ this -> validate ( $ file ) ) { return false ; } $ originalFileName = $ file -> getClientOriginalName ( ) ; $ encryptedFileName = $ this -> getUniqueFilename ( $ originalFileName ) ; $ mimeType = $ file -> getMimeType ( ) ; $ size = $ file -> getSize ( ) ; if ( $ file -> move ( $ this -> getDestination ( ) , $ encryptedFileName ) ) { $ this -> uploadedFileInfo = [ $ this -> originalImageNameField => $ originalFileName , $ this -> field => $ encryptedFileName , $ this -> uploadDir => $ this -> getUploadPath ( ) , 'size' => $ size , 'extension' => $ file -> getClientOriginalExtension ( ) , 'mime_type' => $ mimeType , ] ; return true ; } return false ; }
Uploads file to required destination.

@return bool
Uploads file to required destination .