reghao 3 роки тому
батько
коміт
0aa8e5869b

+ 1 - 1
src/main/java/cn/reghao/tnb/file/app/controller/VideoFileController.java

@@ -39,7 +39,7 @@ public class VideoFileController {
             response.getOutputStream().write("".getBytes(StandardCharsets.UTF_8));
             return;
         }
-        String filePath = LocalStores.getMountedOn(fileUrlDto.getBlockId()) + "/" + fileUrlDto.getFilePath();
+        String filePath = LocalStores.getBaseDir(fileUrlDto.getBlockId()) + "/" + fileUrlDto.getFilePath();
 
         RandomAccessFile raf = new RandomAccessFile(filePath, "r");
         long fileLength = raf.length();

+ 1 - 1
src/main/java/cn/reghao/tnb/file/app/rpc/SpiderFileServiceImpl.java

@@ -62,7 +62,7 @@ public class SpiderFileServiceImpl implements SpiderFileService {
         String uploadId = idGenerator.getUuid();
         FileUser fileUser = new FileUser(uploadId, userId, fileId);
 
-        String filePath = url.replace("//file.reghao.cn", "");
+        String filePath = url.replace("//file1.reghao.cn", "");
         String blockId = LocalStores.getBlockId(filePath);
         String path = "";
         switch (suffix) {