def upload_distribution(self, upload_file):
        filename = secure_filename(upload_file.filename)
        self.logger.info("Uploading distribution: {}".format(filename))
        # don't log binary version content (.tar.gz, .zip, etc.), even at debug

        if self.storage.exists(filename):
            self.logger.warn("Aborting upload of: {}; already exists".format(filename))
            raise ConflictError()

        # write to storage first because read_metadata needs a file path
        path = self.storage.write(filename, upload_file.read())

        try:
            # extract metadata
            self.logger.debug("Parsing source distribution for metadata")
            metadata = self._get_metadata(path, filename)
        except:
            self.logger.debug("Removing uploaded file: {} on error".format(filename))
            self.storage.remove(filename)
            raise
        else:
            self.history.add(metadata["name"], metadata["version"])
            self.projects.add_metadata(metadata)
Wrapper for :py:func:`cmdmod.run<salt.modules.cmdmod.run>` inside a container context
dataset/ETHPy150Open jessemyers/cheddar/cheddar/index/local.py/LocalIndex.upload_distribution--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/dockerio.py/run