1

I have created ActiveX Control that will convert file into bytes array. I am consuming that activeX in my web application using javascript.In IE8 I am able to get byte array for the file but above IE8 it's giving undefined while returning.

I am posting my javascript code below

function CallFunction() {

            var obj = document.Adstringo;
            var filepath = document.getElementById("Fileupload1").value;            
            obj.Source = filepath;        
            var res = obj.GetFileBytes();  // Call ActiveX Function   
}

In res variable I am getting undefined in IE version greater than 8. In IE8 it is working properly.

I have tried changing the data types for the function in activeX.

I have changed from object to byte[]

Maverick
  • 1,396
  • 5
  • 22
  • 42
  • 5
    ActiveX on web browsers is dead. IE8 was the last version of IE that supported non-whitelisted ActiveX objects. IE9 - IE11 supported a small number of whitelisted objects, although you could allow more via "ActiveX filtering." Edge doesn't support them at all. Neither do Firefox, Chrome, Safari, Konqueror, Midori, etc. – T.J. Crowder Aug 31 '16 at 07:42
  • 1
    If you want to convert a file to a byte array, good news! You can do that without ActiveX using the [File API](http://www.w3.org/TR/FileAPI/). [Here's an example on SO.](http://stackoverflow.com/questions/3146483/html5-file-api-read-as-text-and-binary/3146509#3146509) – T.J. Crowder Aug 31 '16 at 07:43

0 Answers0