4
我如何找到文件列表的扩展名。我目前使用的是 os.path.splitext这是不工作的。请在文件列表的情况下建议任何其他方法。如何查找文件列表中的文件扩展名?
我的代码放在这里:
files = request.FILES.getlist('media')
for f in files:
p = os.path.splitext(f)[1]
print p
它显示了错误提前
它工作谢谢 –