Hello
I have problem with send file to imgur.com
I am a beginner angularjs and I have problems.
I doing:
<input type="file"
onchange="angular.element(this).scope().onFileSelect(this)"> in template.
and in js:
$scope.onFileSelect = function(element) {
$.ajax({
url: 'https://api.imgur.com/3/image',
method: 'POST',
processData: false,
contentType: false,
headers: {
Authorization: 'Client-ID xxxxxxxxxxxx',
Accept: 'application/json'
},
data: {
image: element.files[0]
type: 'base64'
},
success: function(data){
alert('tak');
},
error: function(err){
console.log(err)
}
});
}
How I can get data files with input ?
Help me.
Greetings
Aadam
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.