"Database with dbName [ " + dbName + "] does not exist");
}
Object docId = JSON.parse(_id);
BasicDBObject objectId = new BasicDBObject("_id", docId);
GridFS gridFS = new GridFS(mongoInstance.getDB(dbName), bucketName);
GridFSDBFile gridFSDBFile = gridFS.findOne(objectId);
String tempDir = System.getProperty("java.io.tmpdir");
tempFile = new File(tempDir + "/" + gridFSDBFile.getFilename());
gridFSDBFile.writeTo(tempFile);
} catch (MongoException m) {