perf: multi-thread downloader, Content-Disposition
(#4921)
general: enhance multi-thread downloader with cancelable context, immediately stop all stream processes when canceled; feat(crypt): improve stream closing; general: fix the bug of downloading files becomes previewing stream on modern browsers; Co-authored-by: Sean He <866155+seanhe26@users.noreply.github.com> Co-authored-by: Andy Hsu <i@nn.ci>
This commit is contained in:
@ -2,6 +2,7 @@ package model
|
||||
|
||||
import (
|
||||
"github.com/alist-org/alist/v3/pkg/http_range"
|
||||
"github.com/alist-org/alist/v3/pkg/utils"
|
||||
"io"
|
||||
"net/http"
|
||||
"time"
|
||||
@ -45,7 +46,7 @@ type FsOtherArgs struct {
|
||||
}
|
||||
type RangeReadCloser struct {
|
||||
RangeReader RangeReaderFunc
|
||||
Closer io.Closer
|
||||
Closers *utils.Closers
|
||||
}
|
||||
|
||||
type WriterFunc func(w io.Writer) error
|
||||
|
Reference in New Issue
Block a user