title: How can I set the MIME type on a file without a file extension in .NET Core?
body: <p>I've been given some files to work with a WebAssembly module that should be set to load as application/octet-stream.</p>
  
  <p>I've found the documentation for setting the MIME types in Startup.cs and got that working for the WebAssembly module itself.</p>
  
  <p>Unfortunately, there are three other files that should be loaded as application/octet-stream that don't have a file extension eg <code>file1-shard1</code>. I've tried addressing them directly and with wilcards but they still appear as Type = html in the Network tab of Firefox.</p>
  
  <p>Does anyone know how I can set the MIME type for these files correctly please?</p>
  
  <pre class="lang-cs prettyprint-override"><code>            // Set up FileExtension Content Provider for Web Assembly
              var provider = new FileExtensionContentTypeProvider();
              provider.Mappings[".wasm"] = "application/wasm";
              // Set up MIME type for shard files
              provider.Mappings["file1-shard1"] = "application/octet-stream";
              provider.Mappings["*shard1*"] = "application/octet-stream";
              provider.Mappings[".*"] = "application/octet-stream";
              provider.Mappings["."] = "application/octet-stream";
  
              app.UseStaticFiles(new StaticFileOptions
              {
                  ContentTypeProvider = provider
              });
  </code></pre>