0

I am curious about best practices.

I have a Windows Server hosting IIS ASP.NET Web App.

I have an image on the server.

I am downloading the image as a byte array from JavaScript by calling a generic handler which returns the byte array.

i.e.

var jpegByteArray = 'http://myurl/mygenericpage.ashx'

But I could do the same thing using a Web API and returning the JSON object.

What is the fastest, best way option to use?

Thanks

Andrew Simpson
  • 6,883
  • 11
  • 79
  • 179
  • 1
    I think this has already been answered here http://stackoverflow.com/questions/11125535/microsoft-web-api-return-a-file-use-byte – byronbayer Jul 24 '14 at 10:53
  • hi, thanks for posting. +1 for the extra info but it does not tell me if it is better to use WebApi as opposed to using a generic handler? unless I am reading it wrong? – Andrew Simpson Jul 24 '14 at 10:56

0 Answers0