Exemple #1
0
        public void BuildUrlWithSecretKey(string url)
        {
            var thumbor    = new Thumbor("http://localhost/", "secret_key");
            var thumborUrl = thumbor.BuildSignedUrl(url);

            thumborUrl.Should().Be("/BBkKn1mqVJVyKDd3PFh58ATT-dQ=/trim/100x200/filters:grayscale()/http://myserver/myimage.jpg");
        }
Exemple #2
0
        public void TestScenario1()
        {
            var thumbor    = new Thumbor("http://localhost/", "my-security-key");
            var thumborUrl = thumbor.BuildSignedUrl("300x200/my.server.com/some/path/to/image.jpg");

            thumborUrl.Should().Be("/8ammJH8D-7tXy6kU3lTvoXlhu4o=/300x200/my.server.com/some/path/to/image.jpg");
        }
Exemple #3
0
        public void BuildUrlWithoutSecretKey(string url)
        {
            var thumbor    = new Thumbor("http://localhost/");
            var thumborUrl = thumbor.BuildSignedUrl(url);

            thumborUrl.Should().Be("http://localhost/unsafe/trim/100x200/filters:grayscale()/http://myserver/myimage.jpg");
        }