Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

249
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda