0

I am getting a bytes array from ajax call and now i want to convert it to image. I have searched it and i find a way to convert bytes array into base64.My question is how i convert bytes array into base64 in java script or is there any way to show image through bytes array?

$.ajax({
            url: urlGetImages,
            data: { id: id },
            type: 'GET',
            contentType: "application/json; charset=utf-8",

            success: function (data) {

                debugger;
                totalImages = data.AdditionalData.ImagesByteses.length;
                if (totalImages > 0) {

                    //data.AdditionalData.ImagesByteses[0] is array of bytes
                    var imagemarkup ="<img src"">" // I want to show image from this byte array



                }



            },
            error: function () {
                alert(error);
            }
        });
Hiba
  • 231
  • 1
  • 7
  • 23

0 Answers0