@theupscale wrote:
quality: 100, destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.CAMERA, encodingType: Camera.EncodingType.JPEG, allowEdit: true, popoverOptions: CameraPopoverOptions, }; $scope.takePicture = function(data){ $cordovaCamera.getPicture(options).then(function(imageData) { $scope.lastPhoto = imageData.substr(imageData.lastIndexOf('/') + 1) $scope.lastPhoto = file $scope.upload(imageData,data) }, function(err) { console.err(err) }); } $scope.upload = function(file,value){ $scope.aboveDreams = file Upload.upload({ url: ApiEndpoint.url + '/documents', data:{file: file, documentType: value} }).then(function(resp){ console.log('Success ' + resp.config.data.file.name + 'uploaded. Response: ' + resp.data); },function (resp){ console.log('Error status: ' + resp.status) },function(evt){ var progressPercentage = parseInt(100.0 * evt.loaded / evt.total); console.log('progress: ' + progressPercentage + '% ' + evt.config.data.file.name); }) }
I am using ng-file-upload which every times when sending to server throws MultiPart Param file is not present
What am i missing here !
Posts: 2
Participants: 1