From cc74fe72719b3af71ca6bf396399525c6f29f4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E6=A3=AE?= Date: Fri, 24 Dec 2021 16:44:18 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=94=B9pdf=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Report/db.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Report/db.py b/Report/db.py index fc72d89..8896c2c 100644 --- a/Report/db.py +++ b/Report/db.py @@ -21,8 +21,8 @@ def upload_pdf(name): 根据名称保存该企业报告 """ path = get_gen_report_path(name=name) - database = '企业' - collection = 'PDF' + database = '评价' + collection = '综合信用报告' fs = GridFS(client[database], collection) content = open(path, 'rb').read() pdf_id = fs.put(content, content_type='application/pdf', filename=name) @@ -34,8 +34,8 @@ def download_pdf(pdf_id): """ 根据pdf_id查询pdf文件 """ - database = '企业' - collection = 'PDF' + database = '评价' + collection = '综合信用报告' fs = GridFS(client[database], collection) data = fs.get(ObjectId(pdf_id)).read()