我该如何找到文件列表的扩展名?我目前使用的是os.path.splitext,但它并不起作用。如果有其他方法,请建议一下。
我的代码如下:
files = request.FILES.getlist('media')
for f in files:
p = os.path.splitext(f)[1]
print p
它显示错误'InMemoryUploadedFile' 对象没有属性 'rfind'
先提前感谢