def METHOD_NAME(path, zip_file):
    file_paths = []
    for root, dirs, files in os.walk(path):
        for file in files:
            out_file = os.path.join(root, file)
            relative_out_file = os.path.relpath(out_file, path)
            zip_file.write(out_file, relative_out_file)
            mimetype = magic.from_file(out_file, mime=True)
            # Override mimetype for CSS files
            if out_file.split(".")[-1].lower() == "css":
                mimetype = "text/css"
            file_paths.append(
                {"path": relative_out_file, "mimetype": mimetype}
            )
    return file_paths