File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11package handles
22
33import (
4- "github.com/alist-org/alist/v3/internal/task"
5- "github.com/alist-org/alist/v3/pkg/utils"
64 "io"
75 "net/url"
86 stdpath "path"
97 "strconv"
108 "time"
119
10+ "github.com/alist-org/alist/v3/internal/task"
11+ "github.com/alist-org/alist/v3/pkg/utils"
12+
1213 "github.com/alist-org/alist/v3/internal/fs"
1314 "github.com/alist-org/alist/v3/internal/model"
1415 "github.com/alist-org/alist/v3/internal/stream"
@@ -44,7 +45,6 @@ func FsStream(c *gin.Context) {
4445 }
4546 if ! overwrite {
4647 if res , _ := fs .Get (c , path , & fs.GetArgs {NoLog : true }); res != nil {
47- _ , _ = io .Copy (io .Discard , c .Request .Body )
4848 common .ErrorStrResp (c , "file exists" , 403 )
4949 return
5050 }
@@ -89,6 +89,9 @@ func FsStream(c *gin.Context) {
8989 return
9090 }
9191 if t == nil {
92+ if n , _ := c .Request .Body .Read (make ([]byte , 1 )); n == 1 {
93+ _ , _ = io .Copy (io .Discard , c .Request .Body )
94+ }
9295 common .SuccessResp (c )
9396 return
9497 }
You can’t perform that action at this time.
0 commit comments