Jinquan_Ou
2023-03-19 651fa7b481a5688e8f0e88a6031b60194168436e
zhang-content/src/main/java/com/ruoyi/service/impl/DownLoadFileServiceImpl.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.service.DownLoadFileService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
@@ -14,9 +15,14 @@
 */
@Service
public class DownLoadFileServiceImpl implements DownLoadFileService {
    @Value("${ruoyi.profile}")
    private String basePath;
    @Override
    public AjaxResult downLoadFile(String path, HttpServletResponse response) {
        path=basePath+path.substring(8);
        File file = new File(path);
        byte[] buffer = new byte[1024];
        BufferedInputStream bis = null;