misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform πŸš€
https://misskey-hub.net/
GNU Affero General Public License v3.0
10.11k stars 1.38k forks source link

S3 Object Storage ignores meta.objectStorageS3ForcePathStyle while constructing the file-URL #13887

Open Kurty00 opened 6 months ago

Kurty00 commented 6 months ago

πŸ’‘ Summary

I'm using minio as a s3 compatible storage backend. When uploading a file to the drive, the bucket name is not included in the URL despite the s3ForcePathStyle toggle being enabled. When I upload a file, the resulting URL on my instance is https://[host]/[prefix]/[blob] instead of https://[host]/[bucket]/[prefix]/[blob]

πŸ₯° Expected Behavior

The file that is uploaded should have the correct URL in Misskey.

🀬 Actual Behavior

The URL does not include the bucket name.

πŸ“ Steps to Reproduce

  1. Configure objectstorage with minio and enable s3ForcePathStyle
  2. Upload a file to the drive.
  3. The resulting file will not be loaded as Misskey constructed a wrong URL.

πŸ’» Frontend Environment

* Browser: Firefox 126.0
* Server URL: mastodon.nexus
* Sharkey: 2024.3.3

πŸ›° Backend Environment (for server admin)

* Installation Method or Hosting Service: docker compose
* Misskey: sharkey: 2024.3.3
* PostgreSQL: docker.io/postgres:12.2-alpine
* Redis: docker.io/redis:7.0-alpine
* OS and Architecture: Debian amd64

Do you want to address this bug yourself?

Kurty00 commented 5 months ago

I've also opened an issue on the sharkey repo.

https://activitypub.software/TransFem-org/Sharkey/-/issues/508