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

Custom ServiceUrl for S3 compatible services #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonverschuren
Copy link

Added the option to override the service url, this makes it possible to use the S3 filesystem with S3 compatible storage providers like DigitalOcean Spaces.

This is the recommended solution by DigitalOcean: https://www.digitalocean.com/community/questions/how-to-use-digitalocean-spaces-with-the-aws-s3-sdks?answer=44888

Copy link

@LuisNogal LuisNogal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this with Vultr object storage and it works fine.

@justinstenning
Copy link

For containerised solutions like Zenko you may also need to add support for the ForcePathStyle option, e.g.:

src/FubarDev.FtpServer.FileSystem.S3/S3FileSystemOptions.cs:

        /// <summary>
        /// Use path style URLs for S3 (i.e. when using customer endpoints like Zenko)
        /// e.g. https://s3.example.com/bucket/key instead of https://bucket.s3.example.com/key
        /// </summary>
        public bool? ForcePathStyle { get; set; }

src/FubarDev.FtpServer.FileSystem.S3/S3FileSystem.cs:

    config.ServiceURL = options.ServiceUrl;
    config.ForcePathStyle = options.ForcePathStyle == true,

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

Successfully merging this pull request may close these issues.

3 participants