title: Observable from Subject
body: <p>I'm trying to create actions from updates from a RX Subject</p>
  
  <p>It's working but I get the error below.</p>
  
  <p>Here is my Epic</p>
  
  <pre><code>export function uploadSceneFile(action$, store) {
    return action$.ofType(CREATE_SCENE_SUCCESS)
      .mergeMap(({payload}) =&gt;
        UploadSceneWithFile(payload)
          .subscribe(res =&gt; {
            if (res.progress &gt; 0)
              store.dispatch(uploadSceneProgress(res))
            else if(res.progress === -1){
              store.dispatch(uploadSceneSuccess(res))
              requestSceneProcessing(res).map(res =&gt; {
              })
            }
  
          })
      )
  }
  </code></pre>
  
  <p>And here is the Subject</p>
  
  <pre><code>export function UploadSceneWithFile(scene){
  
    const subject$ = new Subject()
  
    const uploader = new S3Upload({
      getSignedUrl: getSignedUrl,
      uploadRequestHeaders: {'x-amz-acl': 'public-read'},
      contentType: scene.file.type,
      contentDisposition: 'auto',
      s3path: 'assets/',
      onError:()=&gt;subject$.next('error'),
      onProgress: (val)=&gt; subject$.next({...scene,progress:val}),
      onFinishS3Put: ()=&gt;subject$.next({...scene,progress:-1}),
    })
    uploader.uploadFile(scene.file)
  
    return subject$
  }
  </code></pre>
  
  <p>I read from a previous post that I'm supposed to be using .map, not .subscribe but nothing happens if I don't subscribe (the upload doesn't happen)</p>
  
  <p>What's the best way of doing this? </p>
  
  <pre><code>subscribeToResult.js:74 Uncaught TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
      at Object.subscribeToResult (subscribeToResult.js:74)
      at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._innerSub (mergeMap.js:132)
      at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._tryNext (mergeMap.js:129)
      at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._next (mergeMap.js:112)
      at MergeMapSubscriber../node_modules/rxjs/Subscriber.js.Subscriber.next (Subscriber.js:89)
      at FilterSubscriber../node_modules/rxjs/operators/filter.js.FilterSubscriber._next (filter.js:89)
      at FilterSubscriber../node_modules/rxjs/Subscriber.js.Subscriber.next (Subscriber.js:89)
      at Subject../node_modules/rxjs/Subject.js.Subject.next (Subject.js:55)
      at createEpicMiddleware.js:60
      at createEpicMiddleware.js:59
      at SafeSubscriber.dispatch [as _next] (applyMiddleware.js:35)
      at 
  </code></pre>