ali path and link

This commit is contained in:
微凉
2021-10-28 22:50:09 +08:00
parent 98f7dffed9
commit 0a50fbd080
13 changed files with 207 additions and 41 deletions

View File

@ -1,9 +1,19 @@
package server
import "github.com/gofiber/fiber/v2"
import (
"github.com/Xhofe/alist/utils"
"github.com/gofiber/fiber/v2"
log "github.com/sirupsen/logrus"
"net/url"
)
func Down(ctx *fiber.Ctx) error {
rawPath := ctx.Params("*")
rawPath, err:= url.QueryUnescape(ctx.Params("*"))
if err != nil {
return ErrorResp(ctx,err,500)
}
rawPath = utils.ParsePath(rawPath)
log.Debugf("down: %s",rawPath)
account, path, driver, err := ParsePath(rawPath)
if err != nil {
return ErrorResp(ctx, err, 500)