mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: {path} marker in name rule representing the virtual path of the file
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/HFO4/cloudreve/pkg/filesystem"
|
||||
"github.com/HFO4/cloudreve/pkg/filesystem/local"
|
||||
"github.com/HFO4/cloudreve/pkg/serializer"
|
||||
"github.com/HFO4/cloudreve/pkg/util"
|
||||
"github.com/HFO4/cloudreve/service/file"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strconv"
|
||||
@@ -54,10 +55,11 @@ func FileUploadStream(c *gin.Context) {
|
||||
}
|
||||
|
||||
fileData := local.FileStream{
|
||||
MIMEType: c.Request.Header.Get("Content-Type"),
|
||||
File: c.Request.Body,
|
||||
Size: fileSize,
|
||||
Name: c.Request.Header.Get("X-FileName"),
|
||||
MIMEType: c.Request.Header.Get("Content-Type"),
|
||||
File: c.Request.Body,
|
||||
Size: fileSize,
|
||||
Name: c.Request.Header.Get("X-FileName"),
|
||||
VirtualPath: util.DotPathToStandardPath(c.Request.Header.Get("X-Path")),
|
||||
}
|
||||
user, _ := c.Get("user")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user