1

im using the ASP MVC REST implementation and extracting image data from a table and sending it through json what is the best practice in doing this inside the controller?

thanks a lot :D

2 Answers 2

1

Your best bet would be to convert the binary image file as a base64 string on the server before sending it to the client then convert it back into binary on the client.

There's a great question here that describes some of the nuances of this approach

Sign up to request clarification or add additional context in comments.

1 Comment

How about going in the other direction? Uploading an image to an MVC endpoint via JSON?
1

Convert your image file to Base64 and use it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.