Implemented GETs for the ContentRepoResource. It all actually appears to be working.

This commit is contained in:
Kegan Dougal 2014-08-18 17:18:39 +01:00
parent 590ab24c85
commit 58548ab557
3 changed files with 65 additions and 15 deletions

View file

@ -32,8 +32,9 @@ angular.module('mFileUpload', [])
console.log("Uploading " + file.name + "... to /matrix/content");
matrixService.uploadContent(file).then(
function(response) {
console.log(" -> Successfully uploaded! Available at " + location.origin + response.data.url);
deferred.resolve(location.origin + response.data.url);
var content_url = location.origin + "/matrix/content/" + response.data.content_token;
console.log(" -> Successfully uploaded! Available at " + content_url);
deferred.resolve(content_url);
},
function(error) {
console.log(" -> Failed to upload " + file.name);