I'd like to know if there is a way to directly store a PHP resource in Doctrine ODM, something like :
$document->setFile($resource);
Or if first have to write it to a temporary file and then use it in setFile()
.
Thanks for your help !
I'd like to know if there is a way to directly store a PHP resource in Doctrine ODM, something like :
$document->setFile($resource);
Or if first have to write it to a temporary file and then use it in setFile()
.
Thanks for your help !
I haven't used GridFS much, but looking at the code you could create instance of GridFSFile
in your setter without providing constructor argument and later call ->setBytes()
method to set what is to be written.