|
@@ -65,7 +65,6 @@
|
|
msg.error(erro);
|
|
msg.error(erro);
|
|
});
|
|
});
|
|
$scope.setAvator = function () {
|
|
$scope.setAvator = function () {
|
|
- console.log("setAvator 1:");
|
|
|
|
var sheet = $ionicActionSheet.show({
|
|
var sheet = $ionicActionSheet.show({
|
|
buttons: [{ text: '<b>拍照</b> 上传' }, { text: '从 <b>相册</b> 中选' }],
|
|
buttons: [{ text: '<b>拍照</b> 上传' }, { text: '从 <b>相册</b> 中选' }],
|
|
titleText: '图片上传',
|
|
titleText: '图片上传',
|
|
@@ -87,7 +86,7 @@
|
|
}else {
|
|
}else {
|
|
$scope.user.avatar = imageUri;
|
|
$scope.user.avatar = imageUri;
|
|
var uploadOptions = new FileUploadOptions();
|
|
var uploadOptions = new FileUploadOptions();
|
|
- uploadOptions.fileKey = "avatar";
|
|
|
|
|
|
+ uploadOptions.fileKey = "photo";
|
|
uploadOptions.fileName = "avatar.jpg";
|
|
uploadOptions.fileName = "avatar.jpg";
|
|
uploadOptions.mimeType = "image/jpeg";
|
|
uploadOptions.mimeType = "image/jpeg";
|
|
uploadOptions.httpMethod = 'post';
|
|
uploadOptions.httpMethod = 'post';
|