public function store(UploadFile $file, $location = null, array $option = [])
    {
        $content = $file->getContent();
        $stream = fopen('php://temp', 'w+b');

        fwrite($stream, $content);
        rewind($stream);

        $result = $this->writeStream($location, $stream, $option);
        fclose($stream);

        if ($result === false) {
            return false;
        }

        $result['content'] = $content;

        return $result;
    }
public function store(UploadFile $file, $location = null, array $option = [])
    {
        $content = $file->getContent();
        $stream = fopen('php://temp', 'w+b');

        fwrite($stream, $content);
        rewind($stream);

        $result = $this->writeStream($location, $stream, $option);
        fclose($stream);

        if ($result === false) {
            return false;
        }

        $result['content'] = $content;

        return $result;
    }
public function store ( UploadFile $ file , $ location = null , array $ option = [ ] ) { $ content = $ file -> getContent ( ) ; $ stream = fopen ( 'php://temp' , 'w+b' ) ; fwrite ( $ stream , $ content ) ; rewind ( $ stream ) ; $ result = $ this -> writeStream ( $ location , $ stream , $ option ) ; fclose ( $ stream ) ; if ( $ result === false ) { return false ; } $ result [ 'content' ] = $ content ; return $ result ; }
Store directly the upload file

@param  UploadFile $file
@param  string $location
@param  array $option

@return mixed
@throws InvalidArgumentException
Store directly the upload file