upload
                                
                                 upload copied to clipboard
                                
                                    upload copied to clipboard
                            
                            
                            
                        Cannot resolve host correctly for AWS S3 module
Bug Report
Current Behavior I built the Minio in a server which is compatible with AWS S3 API and initially it works fine, but when I tried to add the SSL certificate to my domain and attached it to my IP address which holds the Minio server, it crashed. The main problem I checked in my logs is the extension resolved the host incorrectly. It's a weird action -- the normal host should be host:port/bucket_name/image.jpg, but it gave:
bucket_name.host:port/bucket_name/image.jpg. Also, the host should be starting with https, however, it gave http instead. Can you help me solve this issue?
Expected Behavior It should upload image normally.
Screenshots

Environment
- Flarum version: 1.1.1
- Extension version: 1.0.7
- Webserver: nginx
- Hosting environment: vps
- PHP version: 7.4.1
- Browser: Firfox/Safari
Possible solution(s)
I think it might be due to the original code for dealing with S3 API. But I don't know which file is relevant.
It seems like we are passing the options quasi-verbatim to the AWS SDK so I'm not sure what else we could do:
https://github.com/FriendsOfFlarum/upload/blob/fe72df5d93753c011d099242fcc43b38a5b66dda/src/Adapters/Manager.php#L110-L122
Have you tried to change the awsS3UsePathStyleEndpoint setting? (not sure how it's called in the frontend)
I don't see where the HTTPS/HTTP issue is from your screenshot.
Can you share a screenshot/copy of your S3 settings in the Flarum admin panel so we can compare with the error message?
 
 
It seems that I solve the https problem as long as I add https:// for the endpoint part. But still, it would put the bucket_name (in my case, the name is "images") in front of my domain -- which leads to the unresolved host https://images.my_domain:9000/date/image_name. 😅 This is really weird.....
Can someone plz help me?
Unfortunately I don't have any other idea... A change might be required in the extension to make this format work.