mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-02 03:17:56 +08:00
Modify: add general ReaderCloserSeeker interface for handler GET method to return
This commit is contained in:
@ -25,7 +25,7 @@ type Handler struct {
|
||||
}
|
||||
|
||||
// Get 获取文件内容
|
||||
func (handler Handler) Get(ctx context.Context, path string) (io.ReadSeeker, error) {
|
||||
func (handler Handler) Get(ctx context.Context, path string) (response.RSCloser, error) {
|
||||
// 打开文件
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user