I have saved a file into mongoDB using gridFS like so.
Mongo mongo = new Mongo("XXXXX", XXXX);
DB db = mongo.getDB("XXX");
GridFS fs = new GridFS(XXX);
File install = new File("C:\\Users\\Nabeel\\Desktop\\docs.txt");
GridFSInputFile inFile = fs.createFile(install);
inFile.save();
Now I want download that file using spring MVC. I don't seep to able to find example on how i can get the file back as gridFS has converted the file into binary.
An example code would be nice as i am new to all this.
Thanks you in advance