Skip to content

Instantly share code, notes, and snippets.

@maciekciolek
Created May 27, 2015 20:12
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 maciekciolek/497ec99ef7ec35ab0ead to your computer and use it in GitHub Desktop.
Save maciekciolek/497ec99ef7ec35ab0ead to your computer and use it in GitHub Desktop.
vm.upload = function (files) {
if (files && files.length) {
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: 'TU MU URLA WKLEJ',
file: file
}).error(function (evt) {
//TU jest kupa
}).success(function (data, status, headers, config) {
//TU w data jest to co Ci Dominik wypluje
});
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment