feat(quark): shard request file (close #4175)

This commit is contained in:
Andy Hsu
2023-04-17 15:31:39 +08:00
parent 7f35aab071
commit 8711f2a1c5
5 changed files with 68 additions and 14 deletions

View File

@ -17,12 +17,13 @@ type LinkArgs struct {
}
type Link struct {
URL string `json:"url"`
Header http.Header `json:"header"` // needed header
Data io.ReadCloser // return file reader directly
Status int // status maybe 200 or 206, etc
FilePath *string // local file, return the filepath
Expiration *time.Duration // url expiration time
URL string `json:"url"`
Header http.Header `json:"header"` // needed header
Data io.ReadCloser // return file reader directly
Status int // status maybe 200 or 206, etc
FilePath *string // local file, return the filepath
Expiration *time.Duration // url expiration time
Handle func(w http.ResponseWriter, r *http.Request) error // custom handler
}
type OtherArgs struct {