Convert HttpContent into byte[]
问题 I am currently working on a c# web API. For a specific call I need to send 2 images using an ajax call to the API, so that the API can save them as varbinary(max) in the database. How do you extract an Image or byte[] from a HttpContent object? How do I do this twice? Once for each image. - var authToken = $("#AuthToken").val(); var formData = new FormData($('form')[0]); debugger; $.ajax({ url: "/api/obj/Create/", headers: { "Authorization-Token": authToken }, type: 'POST', xhr: function () {