|
@@ -212,13 +212,14 @@ RNTest.config({
|
212
|
212
|
</Info>)
|
213
|
213
|
})
|
214
|
214
|
.then((res) => {
|
|
215
|
+ try {
|
215
|
216
|
deb = Date.now()
|
216
|
217
|
let promise = RNFetchBlob.fetch('POST', 'https://content.dropboxapi.com/2/files/upload', {
|
217
|
218
|
Authorization : `Bearer ${DROPBOX_TOKEN}`,
|
218
|
219
|
'Dropbox-API-Arg': '{\"path\": \"/rn-upload/'+filename+'\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}',
|
219
|
220
|
'Content-Type' : 'application/octet-stream',
|
220
|
221
|
}, RNFetchBlob.wrap(res.path()))
|
221
|
|
- if(Platform.OS === 'ios')
|
|
222
|
+ if(Platform.OS === 'ios') {
|
222
|
223
|
promise.progress((now, total) => {
|
223
|
224
|
if(Date.now() - deb < 1000)
|
224
|
225
|
return
|
|
@@ -233,7 +234,9 @@ RNTest.config({
|
233
|
234
|
</Text>
|
234
|
235
|
</Info>)
|
235
|
236
|
})
|
|
237
|
+ }
|
236
|
238
|
return promise
|
|
239
|
+ } catch(err) { console.log(err) }
|
237
|
240
|
})
|
238
|
241
|
.then((res) => {
|
239
|
242
|
report(<Assert
|