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

Provider does not support CDN #5

Open
nexuschurch opened this issue Jul 23, 2015 · 1 comment
Open

Provider does not support CDN #5

nexuschurch opened this issue Jul 23, 2015 · 1 comment

Comments

@nexuschurch
Copy link

When you enable the CDN property for this S3 provider you get a malformed url. Would suggest something like this in the GetItemUrl method:

    public override string GetItemUrl(IBlobContentLocation content)
    {
        string baseUrl = string.Concat("http://", this.bucketName, ".s3.amazonaws.com/");
        if (!this.Cdn.IsNullOrWhitespace())
        {
            if (Cdn.EndsWith("/"))
            {
                baseUrl = string.Empty;
            }
            else
            {
                baseUrl = "/";
            }
        }
        return string.Concat(baseUrl, content.FilePath);
    }
@caiocaprio
Copy link

I have the same type of problem, some solution?

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

No branches or pull requests

2 participants