added a functionality for saving photos into a /media/photos path