dify/api/core
Luyu Zhang acd6942d21 feat(storage): redirect signed file previews to S3 public base URL
Add an optional S3_PUBLIC_BASE_URL setting that, when configured, lets
file controllers 302-redirect signed previews to the object store / CDN
instead of streaming bytes through the Dify API. Works with any
S3-compatible backend exposing a public domain (Cloudflare R2 custom
domain, MinIO public endpoint, Aliyun OSS public domain, etc.) so that
egress and request handling for images, attachments, tool outputs, and
webapp logos no longer go through the API container.

Signature verification is preserved: the API still validates the HMAC
before issuing the redirect. When S3_PUBLIC_BASE_URL is unset the
behavior is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 17:12:00 -07:00
..
agent chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
app feat: add service api of HITL (#32826) 2026-04-24 06:37:10 +00:00
base chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
callback_handler refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
datasource chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
db fix(db): parameterize sessionmaker with Session (#30612) 2026-01-06 15:23:50 +08:00
entities chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
errors chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
extension refactor: replace bare dict with typed annotations in app_config/extension/provider (#35099) 2026-04-14 06:11:00 +00:00
external_data_tool refactor: replace bare dict with typed annotations in app_config/extension/provider (#35099) 2026-04-14 06:11:00 +00:00
helper feat: marketplace and oauth fixes (#35509) 2026-04-24 07:53:14 +00:00
llm_generator fix: suggest questions more max_tokens (#35533) 2026-04-24 08:02:30 +00:00
logging refactor(api): type _build_log_dict return with LogDict TypedDict (#34983) 2026-04-13 01:06:36 +00:00
mcp fix: prevent double /v1 in MCP server URL causing 404 authorization failure (#34596) 2026-04-20 02:42:59 +00:00
memory chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
moderation chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
ops refactor(api): move trace providers (#35144) 2026-04-17 07:53:35 +00:00
plugin chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
prompt chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
rag fix: keep cleanup tasks resilient to billing API failures (#35600) 2026-04-27 08:51:09 +00:00
repositories chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
schemas refactor: replace bare dict with dict[str, Any] in model provider service and core modules (#35122) 2026-04-14 09:18:30 +00:00
telemetry refactor: replace bare dict with dict[str, Any] in core provider services and misc modules (#35124) 2026-04-14 03:03:08 +00:00
tools feat(storage): redirect signed file previews to S3 public base URL 2026-04-28 17:12:00 -07:00
trigger chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
workflow feat: add service api of HITL (#32826) 2026-04-24 06:37:10 +00:00
__init__.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
hosting_configuration.py chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
indexing_runner.py chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
model_manager.py fix: sync 35528 (#35539) 2026-04-24 03:59:33 +00:00
provider_manager.py fix(workflow): cache provider configurations during graph init (#35447) 2026-04-21 04:29:35 +00:00