Skip to content

Instantly share code, notes, and snippets.

@bobbyg603
Last active August 2, 2022 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobbyg603/b01c615e7f9c8b642e123619c1057237 to your computer and use it in GitHub Desktop.
Save bobbyg603/b01c615e7f9c8b642e123619c1057237 to your computer and use it in GitHub Desktop.
File Uploads with Angular and RxJS
return file$
.pipe(
switchMap(file => this.uploadFile(file)
.pipe(
+ takeWhile(event => event.type !== HttpEventType.Response),
filter(isHttpProgressEvent)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment