Allow accessing same filename differently

This commit is contained in:
Ben Sarmiento
2023-10-17 10:50:10 +02:00
parent da2c53bf86
commit c5f365c8b4
8 changed files with 124 additions and 60 deletions

View File

@@ -12,7 +12,7 @@ func Directory(path string) Response {
}
}
func File(path string, fileSize int, added string) Response {
func File(path string, fileSize int, added string, link string) Response {
return Response{
Href: customPathEscape(path),
Propstat: PropStat{
@@ -21,6 +21,7 @@ func File(path string, fileSize int, added string) Response {
IsHidden: 0,
CreationDate: added,
LastModified: added,
Link: link,
},
Status: "HTTP/1.1 200 OK",
},

View File

@@ -24,6 +24,8 @@ type Prop struct {
CreationDate string `xml:"d:creationdate"`
LastModified string `xml:"d:getlastmodified"`
IsHidden int `xml:"d:ishidden"`
Filename string `xml:"-"`
Link string `xml:"-"`
}
type ResourceType struct {