def _format_files(cls, *fobjs: FileIO) -> List[HttpFile]:
files = []
for fobj in fobjs:
filename = basename(fobj.name)
extension = splitext(filename)[1]
content_type = 'application/{}'.format(extension)
files.append(('file', (filename, fobj, content_type)))
return files
评论列表
文章目录