Skip to content

Asset URL stored as app domain instead of S3 URL - selfhosted #6790

@essamharoon

Description

@essamharoon

Issue Summary

Version 4.1.0 and 4.1.1
Formbricks is storing uploaded file URLs in the database using the application domain (https://fb.domain.com/storage/...) instead of the S3 endpoint (https://s3.domain.com/...), even though S3 storage is correctly configured and ASSET_PREFIX_URL points to the S3 bucket.

As a result, while files are successfully uploaded to S3, the database references still point to the app’s proxy route (/storage/) rather than the actual S3 path. This behavior suggests that Formbricks is using WEBAPP_URL as the base when persisting file URLs instead of ASSET_PREFIX_URL, causing confusion and preventing direct access to S3-hosted files without routing through the application.

Expected Behavior

When S3 storage is enabled and ASSET_PREFIX_URL is defined, Formbricks should store URLs referencing the S3 endpoint directly, so database records reflect the true file location on S3 rather than the app’s /storage proxy.

Other information (incl. screenshots, Formbricks version, steps to reproduce,...)

No response

Your Environment

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions