标签:write tor self tornado async one file pen mod
pic = self.request.files.get(‘pic‘, None)[0]
swf = pic.filename.split(‘.‘)[1]
print(swf)
filename = str(uuid.uuid4()) + ‘.‘ + swf
async with aiofiles.open(os.path.join(settings.MEDIA_ROOT, filename), mode=‘wb+‘) as f:
await f.write(pic.body)
标签:write tor self tornado async one file pen mod
原文地址:https://www.cnblogs.com/meili970202/p/11841014.html