Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables do not resolve correctly in Asset URLs #181

Open
mnlmaier opened this issue Jan 14, 2025 · 1 comment
Open

Environment variables do not resolve correctly in Asset URLs #181

mnlmaier opened this issue Jan 14, 2025 · 1 comment
Labels

Comments

@mnlmaier
Copy link

mnlmaier commented Jan 14, 2025

Description

We are using several Environment Variables for the plugin. All variables are set correctly in .env, but — for some reason — they don't seem to be resolved. I am getting output URLs in the following format:

https://s3.$AWS_BUCKET_REGION.amazonaws.com/$AWS_BUCKET_NAME/images/redacted/redacted.jpg

This is an excerpt of our project.yaml
Image

In our .env file, all variables are set correctly and only once.

Is there anything that we are missing here, should this not be working?

Thanks in advance!

Additional info

  • Craft version: Craft Pro 4.13.7
  • PHP version: 8.1.31
  • Database driver & version: MariaDB 10.11.6
  • Amazon S3 Plugin Version: 2.2.1
@mnlmaier mnlmaier added the bug label Jan 14, 2025
@brianjhanson
Copy link
Contributor

Do you have "Files in this filesystem have public URLs" set to true or false? If it's true, what is your "Base URL" set to?

It's worth noting that environment variables aren't parsed out of the Base URL setting. If you want that to be set based on an environment variable, it has to start with one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants