Closed shirleycharlin closed 7 years ago
@shirleycharlin , may I know what version react-native-fetch-blob
are you using ? Web API polyfills are only available in 0.8.0
which is not a formal release at this moment, though I've successfully getting that work with Firebase SDK, but I'd like to do more tests before release.
If you're going to use alpha
version, you may install the package by this command
$ npm install --save react-native-fetch-blob@alpha
You can also check out the working example code
rn-firebase-storage-upload-sample
But keep in mind the alpha version may be very unstable
I just simply did a npm install react-native-fetch-blob
Earlier this morning (Singapore Time)
On 27 Jul 2016, at 8:01 PM, wkh237 notifications@github.com wrote:
@shirleycharlin , may I know what version react-native-fetch-blob are you using ? Web API polyfills are only available in 0.8.0 which is not a formal release at this moment, though I've successfully getting that work with Firebase SDK, but I'd like to do more tests before release.
If you're going to use alpha version, you may install the package by this command
$ npm install --save react-native-fetch-blob@alpha You can also check out the working example code
rn-firebase-storage-upload-sample
But keep in mind the alpha version may be very unstable
― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
If you're going to use Web API polyfills (e.g. Blob, XMLHttpRequest) you will have to use alpha
version at this moment.
To install latest alpha release
$ npm install --save react-native-fetch-blob@alpha
or you want to install a specific version
$ npm install --save react-native-fetch-blob@0.8.0-alpha.6
Hi right now I am encountering issue with Fetch blob not able to register
and can I know what is the RNFetchBlob trying to wrap here? the path directory or just the source?
var blob = new Blob(RNFetchBlob.wrap(source.uri),{ type : 'image/jpeg;BASE64'})
Refer to wkh237/react-native-fetch-blob#44
Problem filed have solved.
Hi I was prompted error message:![simulator screen shot jul 27 2016 6 48 54 pm](https://cloud.githubusercontent.com/assets/17798099/17173001/cb33cf66-542a-11e6-9f17-dbf04959241d.png)
Here is my code: const ImagePicker = require('react-native-image-picker') //blob import RNFetchBlob from 'react-native-fetch-blob' const fs = RNFetchBlob.fs const Blob = RNFetchBlob.polyfill.Blob
//window.XMLHttpRequest = RNFetchBlob.polyfill.XMLHttpRequest //window.Blob = Blob
const dirs = RNFetchBlob.fs.dirs const prefix = ((Platform.OS === 'android') ? 'file://' : '')
//inside the component function fileToUpload () { const options = { quality: 1.0, maxWidth: 500, maxHeight: 500, storageOptions: { skipBackup: true, path: 'images' } }
}