Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
How to return message Not Matched Excel when are Identical return false?

I make web api return message Not Matched Excel when flag areIdentical is false and when flag areIdentical is true return file

What I have Tried

web api
[Route("ExportNxp")]
        public IActionResult ExportNxp(bool areIdentical)
        {
         
                if (areIdentical == false)
                {
                    return OK("Not Matched Excel");
                }
                else  
                {
                   
                return PhysicalFile(zipPath, "application/zip", Path.GetFileName(zipPath));
              
                }

        }
service.ts
PostUploadzipNxp(file:any):Observable<any>
{
  formData.append('file', file,file.name);
  return this.http.post('http://localhost:61265/api/Z2Delivery/ExportNxp/', formData,{observe: 'response', responseType: 'blob' });
}
component.ts
 this._dataService.PostUploadzipNxp(this.fileToUpload)
     .subscribe(blob => {
       saveAs(blob.body, this.fileToUpload?.name +'.zip');
      });

Result I need

if (areIdentical == false)
{
display message "Not Matched Excel" on angular component 
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!