-
Type:
New Feature
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.5.0
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm using mongodb-odm and currently the framework needs to run additional queries after file uploads to retrieve up-to-date file documents. But this appears to be redundant to me as \MongoDB\GridFS\Bucket::uploadFromStream returns \MongoDB\GridFS\Bucket::getFileIdForStream which already pulls the same data via \MongoDB\GridFS\Bucket::getRawFileDocumentForStream.
So I think it'd be nice if the result of \MongoDB\GridFS\Bucket::getRawFileDocumentForStream can be returned to the caller. This can be done by changing the return value of \MongoDB\GridFS\Bucket::uploadFromStream (breaking change) or a new passed-by-reference parameter. Both should be easy fixes and I can write up a PR if you like the idea.
- links to