Get link from an image saved in bd

0

I'm developing an ASP.NET MVC project using C #.

I have a page with a share button with facebook.

The sharing button is already working, however I'm having problems because of the image tag, because it only accepts hyperlinks of images.

The image I want to display is in the database and is in string format (base64).

OpenGraphProperties.AddImage("http://odishasuntimes.com/wp-content/uploads/2017/04/asteroid.jpg");

This is the method that will allow you to create the og: image tag. This method is working correctly because I passed the link to a random image that I found on the net.

However if I pass you a string from an image I have stored in the DB it will not work. If I go to the facebook debug page I can see it because there shows me an error that says the og: image tag was created incorrectly.

What I want is a way to create a link to an image I have stored in the DB similar to the link above.

One thing I noticed is that if the image is stored in the Project root, instead of being in the DB, for example, in a content / images folder the og: image tag already works.

So:

OpenGraphProperties.AddImage(Url.Content("~/Content/Imagens/User.png"));

How do I create a hyperlink of the image that is stored in the database?

    
asked by anonymous 27.10.2017 / 13:00

1 answer

0

You need to expose a route in your web application or webapi, where the return will be this image, then this route will be the link to your image.

    [HttpGet("{idImagem}")]
    [Route("Imagem")]
    public async Task<IActionResult> Imagem(int idImagem = 0)
    {
        //Faça sua consulta para obter a string Base64 de sua imagem, que está armazenada no banco.
        string src = "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAHe5JREFUeF7tXQdYFMfbvzsEjg4KAip2FAWxxmgkiKiRWBDUSBJbTGKMMbHXJAqWaEw+o7HGGBO7aGLU2LCLjSZqbFQVAYGjl4Oj3n2/dc5h2Sschrj56+2zD8/e7sw7M7935m3z7iJUKBQC/cEfAiL+mta3zCCgZwDP80DIiwiqKskRluQJCyWCtL8FOUmCbqOFTj14RoKn5vlhgGL/J4L484LSQuWoB8wX9pvNEwI8N8uTCDIwrEYfCOQ85BkG/prniQEOrjWGnH6PPwR4bpknBti2EWAR0EOaBa3AMxI8NV//DKgqL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4BnBHhuXr8C9AzgGQGem9evAD0DeEaA5+b1K0DPAJ4R4Ll5/QrQM4BnBHhuXr8C9AzgGQGem9evAD0DeEaA5+b1K0DPAJ4R4Ll5/QrQM4BnBHhuXr8C9AzgGQGem9evAD0DeEaA5+b1K0DPAJ4R4Ll5/QrQM4BnBHhuXr8C9AzgGQGem9evAJ4Z8P8nnufKG5KiRgAAAABJRU5ErkJggg==";

         byte[] data = await Task.Run(() => Convert.FromBase64String(src));

        //utilize o mime correto e nome desejado
        return this.File(data, "image/png", "imagem.png");
    }
    
27.10.2017 / 14:18