I'm trying to upload file to Dropbox with following code. File is successfully uploaded to Dropbox but size gone 0 bytes.
I'm now planning to upload microsoft word and pdf file.
$scope.uploadHtmlFile = function($files) {
var data = $files;
$http({
method: 'PUT',
url: 'https://api-content.dropbox.com/1/files_put/dropbox/' + $files[0].name + '?access_token=TOKEN',
data: data
}).success(function(data, status, headers, config) {
console.log(data);
console.log('file uploaded successfully');
}).error(function(data, status, headers, config) {
console.log('error : ' + data);
console.log('erro file uploaded successfully');
});
}