public function getBytes()
    {
        $result = '';
        foreach ($this->getChunks() as $chunk) {
            $result .= $chunk['data']->bin;
        }

        return $result;
    }
public function getBytes()
    {
        $result = '';
        foreach ($this->getChunks() as $chunk) {
            $result .= $chunk['data']->bin;
        }

        return $result;
    }
public function getBytes ( ) { $ result = '' ; foreach ( $ this -> getChunks ( ) as $ chunk ) { $ result .= $ chunk [ 'data' ] -> bin ; } return $ result ; }
This will load the file into memory. If the file is bigger than your memory, this will cause problems!
@link http://php.net/manual/en/mongogridfsfile.getbytes.php
@return string Returns a string of the bytes in the file
This will load the file into memory . If the file is bigger than your memory this will cause problems!