mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: readme in shared folder
This commit is contained in:
@@ -255,6 +255,10 @@ func (service *SingleFileService) PreviewContent(ctx context.Context, c *gin.Con
|
||||
// 直接返回文件内容
|
||||
defer resp.Content.Close()
|
||||
|
||||
if isText {
|
||||
c.Header("Cache-Control", "no-cache")
|
||||
}
|
||||
|
||||
http.ServeContent(c.Writer, c.Request, fs.FileTarget[0].Name, fs.FileTarget[0].UpdatedAt, resp.Content)
|
||||
|
||||
return serializer.Response{
|
||||
|
||||
Reference in New Issue
Block a user