From 73539753dff0d884a9732c386e0554b400e33370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Mon, 26 Sep 2022 16:30:25 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=81=8C=E4=BD=8D=E6=A8=A1=E7=B3=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/interview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/api_v1/endpoints/interview.py b/api/api_v1/endpoints/interview.py index 408cad3..b806d73 100644 --- a/api/api_v1/endpoints/interview.py +++ b/api/api_v1/endpoints/interview.py @@ -1001,7 +1001,7 @@ async def resume_affix( current_user: schemas.UserDB = Depends(deps.get_current_user) ) -> schemas.Msg: """附件上传到华为云""" - path_data = os.getcwd() + '/head' # 当前文件所在的目录 + path_data = os.getcwd() + '/accessory' # 当前文件所在的目录 if not os.path.exists(path_data): os.makedirs(path_data) contents = await file.read() @@ -1015,11 +1015,11 @@ async def resume_affix( return schemas.Msg(code=400, msg='上传文件有误', data=None) try: # 附件正常上传到华为云 - res = obsClient.putFile('legu-cdn-source', 'hrms/user_icon/' + filename, path_data + '/' + filename) + res = obsClient.putFile('legu-cdn-source', 'hrms/accessory/' + filename, path_data + '/' + filename) if res.status < 300: # 地址 url = res.body.objectUrl - resData = {'file_url': url, 'filename': 'hrms/user_icon/' + filename} + resData = {'file_url': url, 'filename': 'hrms/accessory/' + filename} sql = f""" ALTER table HR.resumes update resume_affix_id = {url} WHERE uid = '{data_in.uid}' """