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",
|
|
|
|
|
)
|
|
|
|
|
|
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-15 07:15:35 +05:30
|
|
|
from . import image_preview, tool_files, upload
|
2025-08-25 09:27:09 +08:00
|
|
|
|
|
|
|
|
api.add_namespace(files_ns)
|
2025-09-15 07:15:35 +05:30
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"api",
|
|
|
|
|
"bp",
|
|
|
|
|
"files_ns",
|
|
|
|
|
"image_preview",
|
|
|
|
|
"tool_files",
|
|
|
|
|
"upload",
|
|
|
|
|
]
|