mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	fix: 文件上传回显URL拼接问题 StrUtil.appendIfMissing
This commit is contained in:
		@@ -118,8 +118,8 @@ public class FileServiceImpl extends BaseServiceImpl<FileMapper, FileDO, FileRes
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
        // 处理本地存储文件 URL
 | 
					        // 处理本地存储文件 URL
 | 
				
			||||||
        FileInfo fileInfo = uploadPretreatment.upload();
 | 
					        FileInfo fileInfo = uploadPretreatment.upload();
 | 
				
			||||||
        fileInfo.setUrl(URLUtil.normalize(storage.getDomain() + StringConstants.SLASH + fileInfo.getPath() + fileInfo
 | 
					        String domain = StrUtil.appendIfMissing(storage.getDomain(), StringConstants.SLASH);
 | 
				
			||||||
            .getFilename()));
 | 
					        fileInfo.setUrl(URLUtil.normalize(domain + fileInfo.getPath() + fileInfo.getFilename()));
 | 
				
			||||||
        return fileInfo;
 | 
					        return fileInfo;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user