New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing observable boolean checking [nzBeforeUpload] #2167

KhaledSMQ opened this Issue Sep 19, 2018 · 0 comments


None yet
3 participants

KhaledSMQ commented Sep 19, 2018




Angular 6

Reproduction link

Steps to reproduce

problems comes when i am return observable and i want to cancel by returning switchMap or for any condition or return false or null upload process continue, means returning observable acutely it's not doing any thing only to keep upload async.

What is expected?

the return type must be valid otherwise will not process uploading the file.

What is actually happening?

I think this part is missing to check boolean returned from observable as per the documentation i can return boolean or observable

if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {

here my suggestion fix for this issue.

        before.subscribe((processedFile: UploadFile | boolean ) => {
             const processedFileType =;
        if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {
          this.attachUid(processedFile as UploadFile );
 as UploadFile);
        } else  if (processedFileType === '[object Boolean]'  && processedFile !== false) {


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment