dify/api/extensions/storage
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
..
clickzetta_volume refactor: replace bare dict with dict[str, Any] in core provider services and misc modules (#35124) 2026-04-14 03:03:08 +00:00
aliyun_oss_storage.py feat: Add OSS-specific parameters for HW and ALI private deployment (#29705) 2025-12-22 21:59:32 +08:00
aws_s3_storage.py feat(storage): redirect signed file previews to S3 public base URL 2026-04-28 17:12:00 -07:00
azure_blob_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00
baidu_obs_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00
base_storage.py feat(storage): redirect signed file previews to S3 public base URL 2026-04-28 17:12:00 -07:00
google_cloud_storage.py refactor(api): replace json.loads with Pydantic validation in controllers and infra layers (#34277) 2026-04-01 05:41:44 +00:00
huawei_obs_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00
opendal_storage.py refactor: replace bare dict with dict[str, Any] in models, providers, extensions, libs, and test utilities (#35186) 2026-04-14 17:51:25 +00:00
oracle_oci_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00
storage_type.py Fix token expiry miscalculation (#24639) 2025-08-27 18:19:58 +08:00
supabase_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00
tencent_cos_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00
volcengine_tos_storage.py ci: try from main repo (#32620) 2026-02-26 16:30:10 +09:00