#46 fix errors

This commit is contained in:
Mario Romano
2016-05-06 01:47:39 +01:00
parent e5b54f40b8
commit 1ea845b58e
11 changed files with 47 additions and 57 deletions

View File

@@ -14,37 +14,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
System.register(['angular2/core', '../models/file.model'], function(exports_1, context_1) {
System.register(['../models/file.model'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, file_model_1;
var file_model_1;
var UploadService;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
},
function (file_model_1_1) {
file_model_1 = file_model_1_1;
}],
execute: function() {
UploadService = (function () {
function UploadService() {
function UploadService(options) {
this.options = options;
this._method = 'POST';
this._authTokenPrefix = 'Basic';
this._authToken = undefined;
this._fieldName = 'file';
this._formFields = {};
this._queue = [];
console.log('UploadService constructor');
this._withCredentials = options.withCredentials != null ? options.withCredentials : this._withCredentials;
this._url = options.url != null ? options.url : this._url;
this._authTokenPrefix = options.authTokenPrefix != null ? options.authTokenPrefix : this._authTokenPrefix;
this._authToken = options.authToken != null ? options.authToken : this._authToken;
this._fieldName = options.fieldName != null ? options.fieldName : this._fieldName;
this._formFields = options.formFields != null ? options.formFields : this._formFields;
}
UploadService.prototype.addToQueue = function (files) {
var latestFilesAdded = [];
@@ -113,10 +109,6 @@ System.register(['angular2/core', '../models/file.model'], function(exports_1, c
UploadService.prototype._isFile = function (file) {
return file !== null && (file instanceof Blob || (file.name && file.size));
};
UploadService = __decorate([
core_1.Injectable(),
__metadata('design:paramtypes', [])
], UploadService);
return UploadService;
}());
exports_1("UploadService", UploadService);