|
@@ -9,6 +9,7 @@ import {
|
9
|
9
|
Linking,
|
10
|
10
|
Platform,
|
11
|
11
|
Dimensions,
|
|
12
|
+ AsyncStorage,
|
12
|
13
|
Image,
|
13
|
14
|
} from 'react-native';
|
14
|
15
|
const JSONStream = RNFetchBlob.JSONStream
|
|
@@ -69,5 +70,18 @@ describe('json stream via fs', (report, done) => {
|
69
|
70
|
done()
|
70
|
71
|
})
|
71
|
72
|
})
|
|
73
|
+})
|
|
74
|
+
|
|
75
|
+describe('issue #102', (report, done) => {
|
|
76
|
+
|
|
77
|
+ RNFetchBlob.config({ fileCache: true })
|
|
78
|
+ .fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
|
|
79
|
+ .then((res) => {
|
|
80
|
+ return RNFetchBlob.fetch('POST', `${TEST_SERVER_URL}/upload-form`, {},
|
|
81
|
+ [{ name : String(1), data : RNFetchBlob.wrap(res.path()), filename: '#102-test-image.png' }])
|
|
82
|
+ })
|
|
83
|
+ .then((res) => {
|
|
84
|
+ console.log(res.text())
|
|
85
|
+ })
|
72
|
86
|
|
73
|
87
|
})
|