瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

dzx 6 月之前
父節點
當前提交
59587f1188
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/com/xjrsoft/module/system/controller/FileController.java

+ 2 - 1
src/main/java/com/xjrsoft/module/system/controller/FileController.java

@@ -269,7 +269,8 @@ public class FileController {
 
             String[] split = dto.getFileUrl().split("\\.");
             String fileSuffiex = split[split.length - 1];
-            return RT.fileStream(byteArray, dto.getFileName() + "." + fileSuffiex);
+            String encodedFileName = URLEncoder.encode(dto.getFileName(), "UTF-8");
+            return RT.fileStream(byteArray, encodedFileName + "." + fileSuffiex);
         } catch (IOException e) {
             throw new RuntimeException(e);
         }