浏览代码

fix:优化百度编辑器文件类型

msgroup 6 月之前
父节点
当前提交
5fdc96883c

+ 1 - 6
pom.xml

@@ -45,11 +45,7 @@
             <artifactId>ms-mdiy</artifactId>
             <version>3.0.0-SNAPSHOT</version>
         </dependency>
-        <dependency>
-            <groupId>net.mingsoft</groupId>
-            <artifactId>store-client</artifactId>
-            <version>3.0.0-SNAPSHOT</version>
-        </dependency>
+
         <dependency>
             <groupId>com.github.oshi</groupId>
             <artifactId>oshi-core</artifactId>
@@ -141,7 +137,6 @@
                     <mainClass>net.mingsoft.MSApplication</mainClass>
                     <executable>true</executable>
                     <includeSystemScope>true</includeSystemScope>
-                    <fork>true</fork>
                 </configuration>
 
             </plugin>

+ 4 - 4
src/main/java/net/mingsoft/cms/action/EditorAction.java

@@ -18,13 +18,13 @@
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-package net.mingsoft.cms.action;
 
+package net.mingsoft.cms.action;
 import cn.hutool.core.map.MapUtil;
 import io.swagger.v3.oas.annotations.Hidden;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletRequest;
-import net.mingsoft.config.MultipartProperties;
+import net.mingsoft.config.MSProperties;
 import net.mingsoft.mdiy.util.ConfigUtil;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -54,14 +54,14 @@ public class EditorAction extends BaseAction{
 
 
     @Resource
-    private MultipartProperties multipartProperties;
+    private MSProperties msProperties;
 
     @ResponseBody
     @RequestMapping(value = "/editor", method = {RequestMethod.GET, RequestMethod.POST})
     public String editor(MultipartFile upfile, HttpServletRequest request, String version) {
 
         Map uploadConfig = ConfigUtil.getMap("文件上传配置");
-        long maxFileSize = multipartProperties.getMaxFileSize();
+        long maxFileSize = msProperties.getUpload().getMultipart().getMaxFileSize();
         Map<String, Object> map = new HashMap<>();
         // 兼容其他版本的上传配置
         if (MapUtil.isNotEmpty(uploadConfig)){

+ 6 - 3
src/main/java/net/mingsoft/cms/action/web/EditorAction.java

@@ -18,6 +18,10 @@
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
+
+
+
+
 package net.mingsoft.cms.action.web;
 
 import cn.hutool.core.map.MapUtil;
@@ -27,7 +31,6 @@ import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletRequest;
 import net.mingsoft.cms.action.BaseAction;
 import net.mingsoft.config.MSProperties;
-import net.mingsoft.config.MultipartProperties;
 import net.mingsoft.mdiy.util.ConfigUtil;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -54,7 +57,7 @@ import java.util.Map;
 public class EditorAction extends BaseAction {
 
     @Resource
-    private MultipartProperties multipartProperties;
+    private MSProperties msProperties;
 
     @ResponseBody
     @RequestMapping(value = "editor", method = {RequestMethod.GET, RequestMethod.POST})
@@ -62,7 +65,7 @@ public class EditorAction extends BaseAction {
         boolean enableWeb = MSProperties.upload.enableWeb;
 
         Map uploadConfig = ConfigUtil.getMap("文件上传配置");
-        long maxFileSize = multipartProperties.getMaxFileSize();
+        long maxFileSize = msProperties.getUpload().getMultipart().getMaxFileSize();
         // 兼容其他版本的上传配置
         if (MapUtil.isNotEmpty(uploadConfig)){
             enableWeb = Boolean.parseBoolean(String.valueOf(uploadConfig.get("uploadEnable")));