Beispiel #1
0
 public static void AddMimeTypes(FileServerOptions opts,IList<string> tdefs)
 {
     var ctp = new Microsoft.Owin.StaticFiles.ContentTypes.FileExtensionContentTypeProvider();
       foreach (var def in tdefs) {
     var d = def.Split(';');
     ctp.Mappings["." + d[0]] = d[1];
       }
       opts.StaticFileOptions.ContentTypeProvider = ctp;
 }
Beispiel #2
0
        public static void AddMimeTypes(FileServerOptions opts, IList <string> tdefs)
        {
            var ctp = new Microsoft.Owin.StaticFiles.ContentTypes.FileExtensionContentTypeProvider();

            foreach (var def in tdefs)
            {
                var d = def.Split(';');
                ctp.Mappings["." + d[0]] = d[1];
            }
            opts.StaticFileOptions.ContentTypeProvider = ctp;
        }