mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-09-07 17:58:55 +08:00
@@ -24,7 +24,7 @@ from quart import request, make_response,send_file
|
||||
from peewee import OperationalError
|
||||
from pydantic import ValidationError
|
||||
|
||||
from api.apps import login_required
|
||||
from api.apps import AUTH_JWT, AUTH_API, AUTH_BETA, login_required
|
||||
from api.constants import FILE_NAME_LEN_LIMIT, IMG_BASE64_PREFIX
|
||||
from api.apps.services.document_api_service import validate_document_update_fields, map_doc_keys, \
|
||||
map_doc_keys_with_run_status, update_document_name_only, update_chunk_method, update_document_status_only, \
|
||||
@@ -1191,6 +1191,7 @@ async def update_metadata_config(tenant_id, dataset_id, document_id):
|
||||
|
||||
|
||||
@manager.route("/thumbnails", methods=["GET"]) # noqa: F821
|
||||
@login_required(auth_types=[AUTH_JWT, AUTH_API, AUTH_BETA])
|
||||
def list_thumbnails():
|
||||
"""
|
||||
Get thumbnails for documents.
|
||||
@@ -1687,6 +1688,7 @@ def _content_type_for_document_image(object_name, data):
|
||||
|
||||
|
||||
@manager.route("/documents/images/<image_id>", methods=["GET"]) # noqa: F821
|
||||
@login_required(auth_types=[AUTH_JWT, AUTH_API, AUTH_BETA])
|
||||
async def get_document_image(image_id):
|
||||
"""
|
||||
Get a document image by ID.
|
||||
@@ -1908,7 +1910,7 @@ async def batch_update_document_status(tenant_id, dataset_id):
|
||||
return get_json_result(data=result)
|
||||
|
||||
@manager.route("/documents/<doc_id>/preview", methods=["GET"]) # noqa: F821
|
||||
@login_required
|
||||
@login_required(auth_types=[AUTH_JWT, AUTH_API, AUTH_BETA])
|
||||
async def get(doc_id):
|
||||
"""Return the raw file bytes for a document the requesting user is authorized to read.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user