peng %!s(int64=2) %!d(string=hai) anos
pai
achega
5507dbd9b4
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Controller/AiController.py

+ 3 - 0
Controller/AiController.py

@@ -155,6 +155,9 @@ class AiView(View):
                 # photo.close()
                 # self.del_path(os.path.join(BASE_DIR, 'static/ai/' + uid))
                 logger.info('没有识别到任何标签-----------------')
+                self.del_path(dir_path)
+                self.del_path(dir_path + '.jpg')
+                logger.info('删除图片成功,路径为:{}'.format(dir_path))
                 return response.json(10055)
             eventType = labels['eventType']
             label_str = ','.join(labels['label_list'])