🚧 aliyundrive webdav write

This commit is contained in:
微凉
2021-12-06 22:14:32 +08:00
parent 28998d6f8c
commit 6e8d551420
5 changed files with 76 additions and 23 deletions

View File

@ -11,8 +11,8 @@ import (
)
type PathReq struct {
Path string `json:"ParentPath"`
Password string `json:"Password"`
Path string `json:"path"`
Password string `json:"password"`
}
func Path(c *gin.Context) {

View File

@ -15,7 +15,6 @@ import (
"net/http"
"path"
"path/filepath"
"strconv"
"strings"
"time"
)
@ -154,10 +153,11 @@ func (fs *FileSystem) Upload(ctx context.Context, r *http.Request, rawPath strin
if err != nil {
return err
}
fileSize, err := strconv.ParseUint(r.Header.Get("Content-Length"), 10, 64)
if err != nil {
return err
}
//fileSize, err := strconv.ParseUint(r.Header.Get("Content-Length"), 10, 64)
fileSize := uint64(r.ContentLength)
//if err != nil {
// return err
//}
filePath, fileName := filepath.Split(path_)
fileData := model.FileStream{
MIMEType: r.Header.Get("Content-Type"),