changed site middleware to use pk and get host method of request object, also assigned settings.site_id to file.site in uploads. Changed uploads file root model to use media location.