code: def Upload(self,directory,filename):
          
          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
docs: Uploads/Updates/Replaces files