MongoDB has an API called GridFS which was made for storing binary files on the database cluster.
But just as with relational databases, storing files in a filesystem on a SAN is often a faster, more efficient, more maintainable and safer alternative.