Added additionalParameter #565

Merged
Fank merged 1 commits from NegSoft2 into development 2017-01-17 13:02:13 +00:00
Showing only changes of commit 4c6b5a2a58 - Show all commits

View File

@@ -31,6 +31,7 @@ export interface FileUploaderOptions {
disableMultipart?:boolean;
itemAlias?: string;
authTokenHeader?: string;
additionalParameter?:{[key: string]: any};
}
export class FileUploader {
@@ -307,6 +308,12 @@ export class FileUploader {
this._onBuildItemForm(item, sendable);
sendable.append(item.alias, item._file, item.file.name);
if (this.options.additionalParameter !== undefined) {
Object.keys(this.options.additionalParameter).forEach((key:string) => {
sendable.append(key, this.options.additionalParameter[key]);
});
}
} else {
sendable = item._file;
}