Skip to content

Instantly share code, notes, and snippets.

@thachnuida
Created February 6, 2016 03:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thachnuida/8de2fb819c4ec0c63fbd to your computer and use it in GitHub Desktop.
Save thachnuida/8de2fb819c4ec0c63fbd to your computer and use it in GitHub Desktop.
Restangular Upload File
var fd = new FormData();
fd.append('file', vm.selectedLogo);
Restangular.one('/api/admin/settings/logo')
.withHttpConfig({transformRequest: angular.identity})
.customPOST(fd, '', undefined, {'Content-Type': undefined})
.then(function() {
getLogo();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment