|
@@ -73,15 +73,18 @@ describe('json stream via fs', (report, done) => {
|
73
|
73
|
})
|
74
|
74
|
|
75
|
75
|
describe('issue #102', (report, done) => {
|
76
|
|
-
|
77
|
|
- RNFetchBlob.config({ fileCache: true })
|
|
76
|
+ let tmp = null
|
|
77
|
+ RNFetchBlob.config({ fileCache: true, appendExt : 'png' })
|
78
|
78
|
.fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
|
79
|
79
|
.then((res) => {
|
|
80
|
+ tmp = res
|
|
81
|
+ RNFetchBlob.ios.previewDocument('file://' + res.path(), 'itms-books:')
|
80
|
82
|
return RNFetchBlob.fetch('POST', `${TEST_SERVER_URL}/upload-form`, {},
|
81
|
83
|
[{ name : String(1), data : RNFetchBlob.wrap(res.path()), filename: '#102-test-image.png' }])
|
82
|
84
|
})
|
83
|
|
- .then((res) => {
|
84
|
|
- console.log(res.text())
|
|
85
|
+ .then((res) => tmp.flush())
|
|
86
|
+ .then(() => {
|
|
87
|
+ done()
|
85
|
88
|
})
|
86
|
89
|
|
87
|
90
|
})
|