Commit beb1120f authored by Kevin Neaton's avatar Kevin Neaton

Display viewed directory's size

parent 269b1d03
This diff is collapsed.
...@@ -13,6 +13,7 @@ const templateFile = "../dir-index.html" ...@@ -13,6 +13,7 @@ const templateFile = "../dir-index.html"
// Copied from go-ipfs/core/corehttp/gateway_indexPage.go // Copied from go-ipfs/core/corehttp/gateway_indexPage.go
type listingTemplateData struct { type listingTemplateData struct {
Listing []directoryItem Listing []directoryItem
Size string
Path string Path string
BackLink string BackLink string
Hash string Hash string
...@@ -34,6 +35,7 @@ var testData = listingTemplateData{ ...@@ -34,6 +35,7 @@ var testData = listingTemplateData{
Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt", Name: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
Path: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt", Path: "this-piece-of-papers-got-47-words-37-sentences-58-words-we-wanna-know.txt",
}}, }},
Size: "25 MiB",
Path: "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm", Path: "/ipfs/QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm",
BackLink: "/..", BackLink: "/..",
Hash: "QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm", Hash: "QmFooBarQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment