MongoDB has a very nice feature called GridFS, which removes the need to store binary data in the filesystem. This example will feature a small (and completely unstyled) image gallery. The gallery allows you to upload a file and store it into MongoDB.
You can find the source code of this example in the
You should have installed the Morphia module in your application and should have a configured up-and-running MongoDB instance.
application.conf file should feature a complete MongoDB configuration as for any Morphia-enabled application. Furthermore, a special parameter has been introduced, which represents the collection to store the binary data. ...