[0.10.5.0.AKKA23][Play 2.3.6]Using ReactiveMongoPlugin.db.Command to return gridFs md5 value

38 views
Skip to first unread message

Ceecer Lamichhane

unread,
Nov 19, 2014, 3:52:45 AM11/19/14
to reacti...@googlegroups.com
Hi,

Inside Play Framework 2.3.6 controller,
def upload = Action.async(gridFSBodyParser(gridFS)) {implicit request =>

val futureFile = request.body.files.head.ref
    val res = futureFile.map { file =>

//Can we call ReactiveMongoPlugin.db.Command(...{ filemd5: ObjectId(file.id), root: "fs" } ...)???????
}

}

In my application, the md5 hash must be returned to the uploader client requesting the file upload.

If so, How can I use ReactiveMongoPlugin.db.Command to get the md5 hash of uploaded file using gridFsBodyParser? as

Stephane suggests here : https://github.com/ReactiveMongo/ReactiveMongo/issues/187


If it is possible to implement, What might be the hazard of using ReactiveMongoPlugin.db.command(...) in production?

Thanks in advance,
Shishir

Ceecer Lamichhane

unread,
Nov 26, 2014, 10:32:18 AM11/26/14
to reacti...@googlegroups.com
Oh, I learnt that the Command only supports Count method for db row count
Reply all
Reply to author
Forward
0 new messages