Just a little shortcut and so you don't need to rely on the promises.
Bug: T107460
Change-Id: I1e36f3cd8cb6b50ec5db6d77512ce03cd98a2caf
this.filename = null;
this.file = null;
this.state = Upload.State.NEW;
this.filename = null;
this.file = null;
this.state = Upload.State.NEW;
+
+ this.imageinfo = undefined;
+ /**
+ * Get the imageinfo object for the finished upload.
+ * Only available once the upload is finished! Don't try to get it
+ * beforehand.
+ * @return {Object|undefined}
+ */
+ UP.getImageInfo = function () {
+ return this.imageinfo;
+ };
+
/**
* Upload the file directly.
* @return {jQuery.Promise}
/**
* Upload the file directly.
* @return {jQuery.Promise}
text: this.text
} ).then( function ( result ) {
upload.state = Upload.State.UPLOADED;
text: this.text
} ).then( function ( result ) {
upload.state = Upload.State.UPLOADED;
+ upload.imageinfo = result.upload.imageinfo;
return result;
}, function () {
upload.state = Upload.State.ERROR;
return result;
}, function () {
upload.state = Upload.State.ERROR;