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

224
Vistas
Download .msg files in client side Reactjs

I have a server containing multiple .msg files I want to enable the user to download them in the client side using the following code:

const download = (fileName) => {
        var FileSaver = require('file-saver');
        FileSaver.saveAs(constants.filesUploadUrl + fileName, fileName);
    }

The download is working fine with all data types except .msg files It gives me "Failed - No file" enter image description here

Is there a way to enable downloading .msg files in client side?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It turned out that I needed to convert the content type into "application/vnd.ms-outlook" As it wasn't recognized via Google chrome as .msg

My backend ASP.Net Core Code for mapping MIME Type:

 }
            var provider = new FileExtensionContentTypeProvider();
            provider.Mappings[".msg"] = "application/vnd.ms-outlook";
            app.UseStaticFiles(new StaticFileOptions
            {
                FileProvider = new PhysicalFileProvider(
                ContentTypeProvider = provider
            });
about 4 years ago · Juan Pablo Isaza Denunciar
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