コード例 #1
0
        public IUrlGenerator DefaultUrlGenerator(UrlGenerationOptions options)
        {
            if (options.PresignedUrls)
            {
                throw new NotImplementedException();
            }

            return(new PublicUrlGenerator(
                       _options.Scheme,
                       _options.Host,
                       _options.Port,
                       $"bulletin-static/{options.BulletinBoardName}"));
        }
コード例 #2
0
ファイル: S3Storage.cs プロジェクト: jmenashe/Bulletin
        public IUrlGenerator DefaultUrlGenerator(UrlGenerationOptions options)
        {
            if (options.PresignedUrls)
            {
                throw new NotImplementedException();
            }

            if (_options.EndpointUrl != null)
            {
                return(new PublicUrlGenerator(
                           "https",
                           _options.EndpointUrl,
                           -1,
                           _options.BucketName));
            }

            // We default to amazon virtual-hosted urls over https, which are the only
            // type supported for new bucket types
            return(new PublicUrlGenerator(
                       "https",
                       $"{_options.BucketName}{S3_HOST_BASE}",
                       -1));
        }