This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
Firebase upload suddenly won't work #179
Closed
Description
I am using
"firebase": "^3.6.0",
"react": "15.3.2",
"react-native": "0.37.0",
"react-native-camera": "git+https://github.com/lwansbrough/react-native-camera.git",
"react-native-fetch-blob": "^0.10.0",
"react-native-vector-icons": "^3.0.0",
"react-native-video": "^0.9.0"
And i'm trying to upload a video recorded with react-native-video to firebase - this worked but suddenly it stopped working and now it doesn't succeed.
I'm using the following code where this.props.file.path looks something like this:
file:///storage/emulated/0/Pictures/vidid.mp4
accept = () => {
let rnfbURI = RNFetchBlob.wrap(this.props.file.path)
Blob
.build(rnfbURI, { type : 'video/mp4;'})
.then((blob) => {
// upload image using Firebase SDK
firebase.storage()
.ref()
.child('testImageName')
.put(blob, { contentType : 'video/mp4' })
.then((snapshot) => {
console.log(snapshot)
blob.close()
done()
})
})
}
I tried writing Firebase support, but then won't help me since this is a workaround.
My blob object looks like this:
{ listeners: {},
isRNFetchBlobPolyfill: true,
multipartBoundary: null,
_ref: 'file:///storage/emulated/0/Pictures/VID_20161113_142100.mp4',
_blobCreated: true,
_closed: false,
cacheName: 'blob-559cd5c4-e880-4742-a3fe-dfae7e1a0df0',
type: 'video/mp4;',
size: '3665375' }