Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda