Implement logic to save files in folders and in DB folder.