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()