Files
dify/api/controllers/files/__init__.py
Harry 6be800e14f refactor(storage): replace storage proxy with ticket-based URL system
- Removed the storage proxy controller and its associated endpoints for file download and upload.
- Updated the file controller to use the new storage ticket service for generating download and upload URLs.
- Modified the file presign storage to fallback to ticket-based URLs instead of signed proxy URLs.
- Enhanced unit tests to validate the new ticket generation and retrieval logic.
2026-01-29 23:39:24 +08:00

35 lines
617 B
Python

from flask import Blueprint
from flask_restx import Namespace
from libs.external_api import ExternalApi
bp = Blueprint("files", __name__, url_prefix="/files")
api = ExternalApi(
bp,
version="1.0",
title="Files API",
description="API for file operations including upload and preview",
)
files_ns = Namespace("files", description="File operations", path="/")
from . import (
image_preview,
storage_files,
tool_files,
upload,
)
api.add_namespace(files_ns)
__all__ = [
"api",
"bp",
"files_ns",
"image_preview",
"storage_files",
"tool_files",
"upload",
]