CrazyIter_Bin 4 éve
szülő
commit
cb2a840b5a
1 módosított fájl, 2 hozzáadás és 6 törlés
  1. 2 6
      HiTeachCE/Startup.cs

+ 2 - 6
HiTeachCE/Startup.cs

@@ -54,6 +54,7 @@ namespace HiTeachCE
                 x.MultipartBodyLengthLimit = long.MaxValue; // In case of multipart
                 x.MultipartHeadersLengthLimit = int.MaxValue;
             });
+            
             services.AddControllersWithViews();
             //跨域设置
             services.AddCors();
@@ -84,12 +85,7 @@ namespace HiTeachCE
                   //  .AllowCredentials();
                 });
             });
-            services.Configure<FormOptions>(x =>
-            {
-                x.ValueLengthLimit = int.MaxValue;
-                x.MultipartBodyLengthLimit = long.MaxValue; // In case of multipart
-                x.MultipartHeadersLengthLimit = int.MaxValue;
-            });
+        
             services.MQTTConnection();
             // Add framework services.
             services.AddMvc(options =>