我有一个史诗:
export default function uploadImage(action$, store) {
return action$.ofType(userActions.UPLOAD_IMAGE)
.mergeMap(action => {
...
RNFetchBlob.fs.readFile(uploadUri, 'base64').then(data => {
firebaseRef.putString(data).then(snapshot => {
console.log('Uploaded a blob or file!');
return Observable.of(userActions.updateImageURL(snapshot.downloadURL)); //<----------
})
});
})
};
但是,这You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
是有道理的。
我如何将回调包装在可观察对象中,以使史诗不会中断?