def upload(self):
        n = self.Name.text()
        if any([(i in n) for i in '"<*>|?/\\:']):
            QtWidgets.QMessageBox.information(
                self.client,
                "Invalid Name",
                "The mod name contains invalid characters: /\\<>|?:\"",
            )
            return

        iconpath = utils.iconPathToFull(self.modinfo.icon)
        infolder = False
        if (
            iconpath != ""
            and (
                os.path.commonprefix([
                    os.path.normcase(self.modDir),
                    os.path.normcase(iconpath),
                ])
                == os.path.normcase(self.modDir)
            )
        ):  # the icon is in the game folder
            # localpath = utils.fullPathToIcon(iconpath)
            infolder = True
        if iconpath != "" and not infolder:
            QtWidgets.QMessageBox.information(
                self.client,
                "Invalid Icon File",
                (
                    "The file {} is not located inside the modfolder. Copy the"
                    " icon file to your modfolder and change the mod_info.lua "
                    "accordingly".format(iconpath)
                ),
            )
            return

        try:
            temp = tempfile.NamedTemporaryFile(
                mode='w+b', suffix=".zip", delete=False,
            )
            zipped = zipfile.ZipFile(temp, "w", zipfile.ZIP_DEFLATED)
            zipdir(self.modDir, zipped, os.path.basename(self.modDir))
            zipped.close()
            temp.flush()
        except BaseException:
            QtWidgets.QMessageBox.critical(
                self.client,
                "Mod uploading error",
                "Something went wrong zipping the mod files.",
            )
            return
        # qfile = QtCore.QFile(temp.name)
        # TODO: implement uploading via API
        ...