Skip to content

Commit e068511

Browse files
jhiemervalorkin
authored andcommitted
fix(uploader): Add the ability to upload files via PUT instead of POST (#239)
* Add the ability to upload files via PUT instead of POST * Add the method Propery to FileUploaderOptions * Added braces and removed whitespaces.
1 parent 8133246 commit e068511

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

components/file-upload/file-item.class.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export class FileItem {
3131
this.options = options;
3232
this.file = new FileLikeObject(some);
3333
this._file = some;
34+
if (uploader.options && uploader.options.method) {
35+
this.method = uploader.options.method;
36+
}
3437
this.url = uploader.options.url;
3538
}
3639

components/file-upload/file-uploader.class.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface FileUploaderOptions {
2222
isHTML5?:boolean;
2323
filters?:Array<FilterFunction>;
2424
headers?:Array<Headers>;
25+
method?:string;
2526
authToken?:string;
2627
maxFileSize?:number;
2728
queueLimit?:number;

0 commit comments

Comments
 (0)