Take the 2-minute tour ×  I have successfully added a file to
GRIDFS using the following:   $asset = new Asset();  I then try
printing the file using the follows:  $dm =
$this->get('doctrine.odm.mongodb.document_manager');
$image = $dm->createQueryBuilder('MyBundle:Asset')
header('Content-type: image/png;');                   echo
$image->getFile()->getBytes();  But nothing shows up. So I do:
and get the follows:  object(Main\MyBundle\Document\Asset)#429
(7) {   string(24) "50330286c7e24c7019000004"   string(6)
"Image2"   object(Doctrine\MongoDB\GridFSFile)#427 (4) {
object(MongoGridFSFile)#430 (3) {       array(7) {
object(MongoId)#431 (1) {           string(24)
"50330286c7e24c7019000004"         string(6) "Image2"
string(14) "/tmp/phpQ1LCIC"         object(MongoDate)#432 (2) {
string(32) "5bbc9ede74f50f93a3f7d1f7babe3170"
object(MongoGridFS)#437 (5) {
object(MongoCollection)#438 (2) {         string(12)
"assets.files"         string(13) "