diff --git a/cmd/httpServer.go b/cmd/httpServer.go
index 45bc2af..e42c9e8 100644
--- a/cmd/httpServer.go
+++ b/cmd/httpServer.go
@@ -77,14 +77,28 @@ func listFiles(c *gin.Context) {
return
}
var list string
+ currentLocation := fmt.Sprintf("Current location: %v
", path)
+ list += currentLocation
+
+ split := strings.Split(path, "/")
+ parentFolder := strings.Join(split[:len(split)-1], "/")
+ if parentFolder == "" {
+ parentFolder = "/"
+ }
+
+ parentFolderLink := fmt.Sprintf("../
",
+ client.ClientID, parentFolder)
+ list += parentFolderLink
+
for _, v := range resp.FileList.File {
- isDir := ""
if v.IsFolder == true {
- isDir = "/"
+ entry := fmt.Sprintf("[DIR] %v
",
+ client.ClientID, v.FullPath, v.Name)
+ list += entry
+ } else {
+ entry := fmt.Sprintf("%v
", v.Name)
+ list += entry
}
- entry := fmt.Sprintf("