dify/api/tests/unit_tests/controllers
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
..
common test: unit test case for controllers.common module (#32056) 2026-03-09 09:45:42 +08:00
console fix: hit-testing response failed because of Pydantic check. (#35640) 2026-04-28 08:37:13 +00:00
files feat(storage): redirect signed file previews to S3 public base URL 2026-04-28 17:12:00 -07:00
inner_api fix: scope plugin inner API end-user lookup by tenant (#35325) 2026-04-17 06:12:07 +00:00
service_api fix: hit-testing response failed because of Pydantic check. (#35640) 2026-04-28 08:37:13 +00:00
trigger fix: clarify webhook debug endpoint behavior (#33597) 2026-03-18 14:28:33 +08:00
web chore: fix use select style api in orm (#35531) 2026-04-24 08:35:20 +00:00
__init__.py feat: return data_source_info and data_source_detail_dict (#29912) 2026-01-05 11:04:03 +08:00
test_compare_versions.py refactor(version): simplify version comparison logic (#10109) 2024-10-31 15:15:32 +08:00
test_conversation_rename_payload.py fix: conversation rename payload validation (#29510) 2025-12-11 18:05:41 +09:00