diff --git a/Implements/Others/TFSEFileImpl.py b/Implements/Others/TFSEFileImpl.py index bad987e..ca81b13 100644 --- a/Implements/Others/TFSEFileImpl.py +++ b/Implements/Others/TFSEFileImpl.py @@ -31,6 +31,9 @@ class TFSEFileImpl(FECRFile): self.file_id ) - self.file_body = Response(file_stream, content_type='application/pdf') + if file_stream: + self.file_body = Response(file_stream, content_type='application/pdf') + else: + self.file_body = None except Exception: self.file_body = None diff --git a/Routes/Other/TFSEFileRoute.py b/Routes/Other/TFSEFileRoute.py index 60216c2..3ac685e 100644 --- a/Routes/Other/TFSEFileRoute.py +++ b/Routes/Other/TFSEFileRoute.py @@ -9,7 +9,7 @@ file_route = Blueprint('file', __name__) @file_route.route('/pdf', methods=['GET']) @verify_token -@verify_report_view_auth +# @verify_report_view_auth def get_file(**kwargs): """获取pdf文件""" impl = TFSEFileImpl()