mirror of
https://github.com/langgenius/dify.git
synced 2026-03-09 17:36:44 +08:00
- Removed unused app asset download and upload endpoints, along with sandbox archive and file download endpoints. - Updated imports in the file controller to reflect the removal of these endpoints. - Simplified the generator.py file by consolidating the code context field definition. - Enhanced the storage layer with a unified presign wrapper for better handling of presigned URLs.
35 lines
617 B
Python
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_proxy,
|
|
tool_files,
|
|
upload,
|
|
)
|
|
|
|
api.add_namespace(files_ns)
|
|
|
|
__all__ = [
|
|
"api",
|
|
"bp",
|
|
"files_ns",
|
|
"image_preview",
|
|
"storage_proxy",
|
|
"tool_files",
|
|
"upload",
|
|
]
|