Uploads/Updates/Replaces files

def Upload(self,directory,filename):
        """Uploads/Updates/Replaces files"""
        if self._isMediaFile(filename):
            return self._upload_media(directory,filename)
        elif self._isConfigFile(filename):
            return self._update_config(directory,filename)

        print "Not handled!"
        return False