使用 ngImgCrop 插件,生成 base64 数据。使用 $http.post() 传递 base64 数据时,发生 414 错误,提示参数太大。
求解决的办法,不想用 原生的 ‘form post’ 请求。在线等...
//*** 省略URL ***//
....
//----参数
_params={image_url:$scope.cropper.croppedImage,name:_form.name}
//----请求
$http({
method:"POST",
url:_url,
params:_params,
headers:{'Content-Type':'application/x-www-form-urlencoded'},
transformRequest:angular.identity
});
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号