dify/api/configs/middleware/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
..
aliyun_oss_storage_config.py feat: Add OSS-specific parameters for HW and ALI private deployment (#29705) 2025-12-22 21:59:32 +08:00
amazon_s3_storage_config.py feat(storage): redirect signed file previews to S3 public base URL 2026-04-28 17:12:00 -07:00
azure_blob_storage_config.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
baidu_obs_storage_config.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
clickzetta_volume_storage_config.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
google_cloud_storage_config.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
huawei_obs_storage_config.py feat: Add OSS-specific parameters for HW and ALI private deployment (#29705) 2025-12-22 21:59:32 +08:00
oci_storage_config.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
opendal_storage_config.py feat: full support for opendal and sync configurations between .env and docker-compose (#11754) 2024-12-18 09:05:54 +08:00
supabase_storage_config.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
tencent_cos_storage_config.py feat: support tencent cos custom domain (#30193) 2025-12-29 15:41:02 +08:00
volcengine_tos_storage_config.py fix: Correction to the full name of Volc TOS (#30741) 2026-01-14 10:11:30 +08:00