Revert "Revert "Store uploaded files in the database""

This reverts commit 4bbc3f1fc436676290a48131c874f973eea0bf14.