- 根据公司需求,最近需要做一个文件下载功能,使用flask做后台服务,vue写前端测试。
- flask实现接收文件时先根据指定的人进行创建文件夹
if userid and file:
userid_path = r'D:\bmd\bmd_server\src\company\flask_server\files\{}'.format(userid)
if os.path.exists(userid_path):
tel_file_path = userid_path + '\TEL'
if os.path.exists(tel_file_path):
pass
else:
os.mkdir(tel_file_path)