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

220
Views
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 answers
Answer question

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 Report
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!