Finish the image cache preview things.

This commit is contained in:
zicla
2019-04-04 02:03:20 +08:00
parent c371d9d5bd
commit 28b4227215
3 changed files with 17 additions and 6 deletions

View File

@ -125,10 +125,10 @@ func (this *AlienService) PreviewOrDownload(
}
//直接使用缓存中的信息
this.matterService.DownloadFile(writer, request, CONFIG.MatterPath+imageCache.Path, matter.Name, withContentDisposition)
this.matterService.DownloadFile(writer, request, GetUserCacheRootDir(imageCache.Username)+imageCache.Path, imageCache.Name, withContentDisposition)
} else {
this.matterService.DownloadFile(writer, request, CONFIG.MatterPath+matter.Path, matter.Name, withContentDisposition)
this.matterService.DownloadFile(writer, request, GetUserFileRootDir(matter.Username)+matter.Path, matter.Name, withContentDisposition)
}
//文件下载次数加一,为了加快访问速度,异步进行