Feat: chunk upload handling for local policy

This commit is contained in:
HFO4
2022-02-27 14:13:39 +08:00
parent c301bd6045
commit 3444b4a75e
17 changed files with 280 additions and 67 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/cloudreve/Cloudreve/v3/pkg/conf"
"github.com/cloudreve/Cloudreve/v3/pkg/filesystem"
"github.com/cloudreve/Cloudreve/v3/pkg/request"
"github.com/cloudreve/Cloudreve/v3/pkg/serializer"
"github.com/cloudreve/Cloudreve/v3/service/explorer"
"github.com/gin-gonic/gin"
@@ -290,6 +291,7 @@ func FileUpload(c *gin.Context) {
if err := c.ShouldBindUri(&service); err == nil {
res := service.Upload(ctx, c)
c.JSON(200, res)
request.BlackHole(c.Request.Body)
} else {
c.JSON(200, ErrorResponse(err))
}