I have implemented image upload page using angularJS.
html binding part and anguler controller part working fine.but problem is when I pass object with uploaded images(64 base string) to server side using Ajax call. it'll give a error something like "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property....."
I have tried adding
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647"/>
</webServices>
</scripting>
but it doesn't work.
this is my angular service below,
In my angular service "purchaseOrder" is object include with OrderId,Price,ImageUploaded (image as 64 base string)
'use strict';
appForm.factory('CheckoutService', function ($http) {
function CompleteCheckout(purchaseOrder) {
return $http({
method: 'POST',
url: '/Checkout/CompleteCheckout',
data: { "objPurchaseOrder": purchaseOrder }
}).then(function (results) {
return results.data;
})
};
return {
GetCartItems:GetCartItems
}});