@@ -90,8 +90,8 @@ class Session {
90
90
this . _id = id ;
91
91
}
92
92
93
- public uploadFile ( file : string , options : common . Request ) : Task {
94
- return Task . create ( this , file , options ) ;
93
+ public uploadFile ( fileUri : string , options : common . Request ) : Task {
94
+ return Task . create ( this , fileUri , options ) ;
95
95
}
96
96
97
97
public multipartUpload ( params : Array < any > , options : common . Request ) : Task {
@@ -127,7 +127,10 @@ class Task extends ObservableBase {
127
127
128
128
request . setFileToUpload ( file ) ;
129
129
130
- request . setNotificationConfig ( new ( < any > net ) . gotev . uploadservice . UploadNotificationConfig ( ) ) ;
130
+ var displayNotificationProgress = typeof options . androidDisplayNotificationProgress === "boolean" ? options . androidDisplayNotificationProgress : true ;
131
+ if ( displayNotificationProgress ) {
132
+ request . setNotificationConfig ( new ( < any > net ) . gotev . uploadservice . UploadNotificationConfig ( ) ) ;
133
+ }
131
134
132
135
var headers = options . headers ;
133
136
if ( headers ) {
@@ -189,7 +192,10 @@ class Task extends ObservableBase {
189
192
request . setUtf8Charset ( ) ;
190
193
}
191
194
192
- request . setNotificationConfig ( new ( < any > net ) . gotev . uploadservice . UploadNotificationConfig ( ) ) ;
195
+ var displayNotificationProgress = typeof options . androidDisplayNotificationProgress === "boolean" ? options . androidDisplayNotificationProgress : true ;
196
+ if ( displayNotificationProgress ) {
197
+ request . setNotificationConfig ( new ( < any > net ) . gotev . uploadservice . UploadNotificationConfig ( ) ) ;
198
+ }
193
199
194
200
var headers = options . headers ;
195
201
if ( headers ) {
0 commit comments