How to upload a file to the database using playfra

2019-07-21 15:05发布

问题:

What is the recommended way of handling file uploads to the database using Play!2 with Scala?

回答1:

Depending on your specific requirements, MongoDB's GridFS will store files for you in a much more efficient and scalable manner than any relational database and filesystem.

http://www.mongodb.org/display/DOCS/GridFS

There are plenty of MongoDB plugins for Play that support GridFS.