# 添加多个附件参数化
files = [("1.png", "1.png")
("2.png", "2.png")
]
def addFiles(files, n=1):
file = []
for i in list(range(n)):
a =("files[]", (files[i][1], open(files[i][2], "rb"), "image/png"))
b = ("labels[]", (None, '附件标题1')),
("files[]", ("2.png", open("d:\\2.png", "rb"), "image/png")),
("labels[]", "tu2"),
file.append(a)
file.append(b)
return file