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

AWS S3 URL rendered when custom S3-compatible service configured #495

Closed
benaltair opened this issue Sep 29, 2021 · 5 comments
Closed

AWS S3 URL rendered when custom S3-compatible service configured #495

benaltair opened this issue Sep 29, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@benaltair
Copy link

Version:

  • listmonk: v2.0.0
  • OS: Configured through Heroku one-click

Description of the bug and steps to reproduce:

  1. Set custom S3-compatible backend URL
  2. Set Bucket type to Private
  3. Navigate to Media gallery
  4. Click on or hover over the ↗ symbol to open the image in a new tab
  5. Observe the Amazon URL, incongruent with the custom URL set in settings

Screenshots:

Settings:
image

Wrong URL in media gallery:
image

@benaltair benaltair added the bug Something isn't working label Sep 29, 2021
@benaltair
Copy link
Author

Setting the bucket type for Public fixes the URL shown in the frontend.

@benaltair
Copy link
Author

Note: the missing thumbs are due to a separate issue #496

@knadh
Copy link
Owner

knadh commented Oct 4, 2021

I'm unable to reproduce the issue where the custom backend URL is ignored and the amazonaws.com URL is rendered on the uploads. In fact, the amazonaws.com URL is not stored in the database alongside the files and neither is it present anywhere in the codebase.

image

Can you share the API response? (https://yoursite.com:9000/api/media)

@benaltair
Copy link
Author

I might be missing something, but I thought this was the culprit:

opt.URL = fmt.Sprintf("https://s3.%s.amazonaws.com", opt.Region)

Unfortunately we're moving in a different direction and I don't have a Listmonk instance running at this time, but I'm keeping it in mind for an upcoming project.

@knadh
Copy link
Owner

knadh commented Oct 13, 2021

I might be missing something, but I thought this was the culprit:

That can't be it. That bit is a fallback that only applies when the URL is empty.

Unfortunately we're moving in a different direction and I don't have a Listmonk instance running at this time, but I'm keeping it in mind for an upcoming project.

Sure. Closing the issue for now. Please re-open if you face this again. Thanks!

@knadh knadh closed this as completed Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants