How to return an observable from service in angular after chaining pipe operations
问题 I'm trying to chain / pipe operations and return an Observable from a Service in angular which uses angular fire. With promises I have this working Service saveDiploma(diploma: { title: any; description: any; picture: any }) { return new Observable(observer => { const id = this.db.createId(); this.storage.ref(`diplomas/${id}/original.jpg`) .putString(diploma.picture, 'data_url') .then(task => { task.ref.getDownloadURL() .then(url => { const saved = { title: diploma.title, description: diploma