store photo in database