I am struggling converting image to byte array using client side script. I have to convert image to byte array, and pass this array to web service , so that the web services can save the image in sql server. Any one please help me.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
i have found one solution. 🙂
in html javascript file, first convert the uploaded image to base64 image format using following code.
so we got base64 code of uploaded image in
dataURL.NOW SEND THIS BASE64 CODE (
dataURL) to web service and convert the base64 string to byte array using following code and save to sql server tooc# code–for converting base64 to byte arry and to store on sql
hope u understand 🙂 ……