Open kapeeeek opened 6 years ago
Hi, thanks for this pretty good tool.
I've got a problem with email attachment.
My html:
<input type="file" ng-file-select="onFileSelect($files)"/> <button type="button" class="btn btn-success btn-lg" ng-click="sendEmail()"> <span class="glyphicon glyphicon glyphicon-send"></span> Send </button>
<input type="file" ng-file-select="onFileSelect($files)"/>
<button type="button" class="btn btn-success btn-lg" ng-click="sendEmail()"> <span class="glyphicon glyphicon glyphicon-send"></span> Send </button>
Then in my JS:
$scope.sendEmail= function(){ var file = $files[0]; $scope.emailData = new EmailData(); $scope.emailData.to = "example@gmail.com"; $scope.emailData.from = "example2@gmail.com"; $scope.emailData.subject = "Sending issue"; $scope.emailData.type= "Type"; $scope.emailData.title = $scope.data.topic; $scope.emailData.description= $scope.data.description; $scope.emailData.template = "templateErrors"; Upload.upload({ url: 'sendemail/attachment', data: {$scope.emailData}, file: file, }).success(function(data, status, headers, config) { console.log(data); }); }
Someone can help me?
Hi, thanks for this pretty good tool.
I've got a problem with email attachment.
My html:
<input type="file" ng-file-select="onFileSelect($files)"/>
<button type="button" class="btn btn-success btn-lg" ng-click="sendEmail()"> <span class="glyphicon glyphicon glyphicon-send"></span> Send </button>
Then in my JS:
Someone can help me?