Modify: Decide whether to redirect when previewing based on storage policy

This commit is contained in:
HFO4
2019-12-31 13:09:26 +08:00
parent eceee2fc76
commit 8a262a15d5
7 changed files with 144 additions and 34 deletions

View File

@@ -7,11 +7,11 @@ import "io"
// 有些直接写文件数据到浏览器
type ContentResponse struct {
Redirect bool
Content io.ReadSeeker
Content RSCloser
URL string
}
// 存储策略适配器返回的文件流有些策略需要带有Closer
// RSCloser 存储策略适配器返回的文件流有些策略需要带有Closer
type RSCloser interface {
io.ReadSeeker
io.Closer