CrazyIter 4 years ago
parent
commit
fb96b5c086

+ 3 - 1
TEAMModelOS.SDK/Context/Constant/ContentTypeDict.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -7,6 +7,8 @@ namespace TEAMModelOS.SDK.Context.Constant
     public static class ContentTypeDict
     {
         public static readonly Dictionary<string, string> extdict = new Dictionary<string, string> {
+            //{ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xlsx"},
+            { "audio/x-ms-wma",".wma"},
             {"video/3gpp",".3g2"},
 {"audio/mp4",".aac"},
 {"audio/ac3",".ac3"},

+ 4 - 0
TEAMModelOS/Controllers/Exam/ImportExerciseController.cs

@@ -108,6 +108,10 @@ namespace TEAMModelOS.Controllers
             htex.slides = null;
             Dictionary<string, Store> dict = new Dictionary<string, Store>();
             foreach (var key in htex.stores.Keys) {
+                if (key.EndsWith(".wdp")||key.EndsWith(".xlsx")) {
+                    htex.stores.Remove(key);
+                    continue;
+                }
                 var store = htex.stores[key];
                 Store str = new Store() { path=key,contentType= store.contentType ,isLazy=store.isLazy};
                 if (!store.isLazy && store.contentType != null && ContentTypeDict.extdict.TryGetValue(store.contentType, out string ext) && store.url.Contains(";base64,"))

+ 1 - 1
TEAMModelOS/TEAMModelOS.csproj

@@ -7,7 +7,7 @@
     <PackageReference Include="Bogus" Version="29.0.1" />
     <PackageReference Include="Caching.CSRedis" Version="3.5.5" />
     <PackageReference Include="CSRedisCore" Version="3.5.5" />
-    <PackageReference Include="HTEXLib" Version="1.0.2" />
+    <PackageReference Include="HTEXLib" Version="1.0.4" />
     <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.6" />
     <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.6" />
     <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.2" />