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

218
Vistas
there is upload time mismatch between server and client?

I am uploading files/folder on server. and tracking progress with HttpEventType on client side to show progress but it showing file upload completed even all file has not been uploaded on server. and after some time there is response from server of success.

fileUpload(event: any) {
    this.files = event.target.files;
    this.api.uploadFiles(this.files).subscribe((res) => {
      console.log(res);
    })
  }
uploadFiles(file:FileList){
    const formData:FormData =new FormData();
    formData.append("key","name")
    for(let i=0;i<file.length;i++){
       formData.append("files",file[i]);
    }
    const req = new HttpRequest('POST',fileUploadPath, formData, {
      reportProgress: true
    });
    return this.http.request(req).pipe(
      
      map(res =>{
          if (res.type === HttpEventType.UploadProgress) {
            const percentDone = Math.round(100 * res.loaded / (res.total ?? 0));
            this.loader.progressValue=percentDone;
          }
          if(res.type==HttpEventType.Response){
            this.loader.displayProgress=false;
          }
          return res;
      }),
      catchError((err):any=>{this.error.handleError(err);return err})
    );
  }
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