@@ -213,25 +213,27 @@ RNTest.config({
213213 } )
214214 . then ( ( res ) => {
215215 deb = Date . now ( )
216- return RNFetchBlob . fetch ( 'POST' , 'https://content.dropboxapi.com/2/files/upload' , {
216+ let promise = RNFetchBlob . fetch ( 'POST' , 'https://content.dropboxapi.com/2/files/upload' , {
217217 Authorization : `Bearer ${ DROPBOX_TOKEN } ` ,
218218 'Dropbox-API-Arg' : '{\"path\": \"/rn-upload/' + filename + '\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}' ,
219219 'Content-Type' : 'application/octet-stream' ,
220220 } , RNFetchBlob . wrap ( res . path ( ) ) )
221- . progress ( ( now , total ) => {
222- if ( Date . now ( ) - deb < 1000 )
223- return
224- deb = Date . now ( )
225- if ( begin2 === - 1 )
226- begin2 = Date . now ( )
227- let speed = Math . floor ( now / ( Date . now ( ) - begin2 ) )
228- report ( < Info uid = "100" key = "progress" >
229- < Text >
230- { `upload ${ now } / ${ total } bytes (${ speed } kb/s)` }
231- { ` ${ Math . floor ( ( total - now ) / speed / 1000 ) } seconds left` }
232- </ Text >
233- </ Info > )
234- } )
221+ if ( Platform . OS === 'ios' )
222+ promise . progress ( ( now , total ) => {
223+ if ( Date . now ( ) - deb < 1000 )
224+ return
225+ deb = Date . now ( )
226+ if ( begin2 === - 1 )
227+ begin2 = Date . now ( )
228+ let speed = Math . floor ( now / ( Date . now ( ) - begin2 ) )
229+ report ( < Info uid = "100" key = "progress" >
230+ < Text >
231+ { `upload ${ now } / ${ total } bytes (${ speed } kb/s)` }
232+ { ` ${ Math . floor ( ( total - now ) / speed / 1000 ) } seconds left` }
233+ </ Text >
234+ </ Info > )
235+ } )
236+ return promise
235237 } )
236238 . then ( ( res ) => {
237239 report ( < Assert
0 commit comments