Feat: list objects in specific path

This commit is contained in:
HFO4
2019-11-24 13:06:15 +08:00
parent a89c3cb11a
commit b431f3674c
8 changed files with 144 additions and 15 deletions

View File

@@ -37,10 +37,9 @@ func FileUploadStream(c *gin.Context) {
Name: c.Request.Header.Get("X-FileName"),
VirtualPath: util.DotPathToStandardPath(c.Request.Header.Get("X-Path")),
}
user, _ := c.Get("user")
// 创建文件系统
fs, err := filesystem.NewFileSystem(user.(*model.User))
fs, err := filesystem.NewFileSystemFromContext(c)
if err != nil {
c.JSON(200, serializer.Err(serializer.CodePolicyNotAllowed, err.Error(), err))
return