2023-11-13 22:05:46 +08:00
|
|
|
from flask import Blueprint
|
2025-08-25 09:27:09 +08:00
|
|
|
from flask_restx import Namespace
|
2024-04-18 20:24:05 +08:00
|
|
|
|
2023-11-13 22:05:46 +08:00
|
|
|
from libs.external_api import ExternalApi
|
|
|
|
|
|
2025-08-25 09:27:09 +08:00
|
|
|
bp = Blueprint("files", __name__, url_prefix="/files")
|
2023-11-13 22:05:46 +08:00
|
|
|
|
2025-08-25 09:27:09 +08:00
|
|
|
api = ExternalApi(
|
|
|
|
|
bp,
|
|
|
|
|
version="1.0",
|
|
|
|
|
title="Files API",
|
|
|
|
|
description="API for file operations including upload and preview",
|
|
|
|
|
doc="/docs", # Enable Swagger UI at /files/docs
|
|
|
|
|
)
|
|
|
|
|
|
2025-08-25 14:56:20 +08:00
|
|
|
files_ns = Namespace("files", description="File operations", path="/")
|
2023-11-13 22:05:46 +08:00
|
|
|
|
2025-09-10 01:54:26 +08:00
|
|
|
from . import image_preview, tool_files, upload # pyright: ignore[reportUnusedImport]
|
2025-08-25 09:27:09 +08:00
|
|
|
|
|
|
|
|
api.add_namespace(files_ns)
|