aboutsummaryrefslogtreecommitdiff
path: root/imgs.go
diff options
context:
space:
mode:
Diffstat (limited to 'imgs.go')
-rw-r--r--imgs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/imgs.go b/imgs.go
index 4e614e9..fcccc7d 100644
--- a/imgs.go
+++ b/imgs.go
@@ -58,7 +58,7 @@ func imgs(w http.ResponseWriter, r *http.Request) {
//})
start := page * pageSize
//imgs := extractImgs(files, start)
- imgs, err := extractImgsGlob(userDocPath)
+ imgs, err := extractImgsGlob(userDocPath, username)
if err != nil {
sendError(w, r, err.Error(), http.StatusInternalServerError)
return
@@ -105,7 +105,7 @@ func imgs(w http.ResponseWriter, r *http.Request) {
unauthorized(w, r)
}
-func extractImgsGlob(userDocPath string) ([]Doc, error) {
+func extractImgsGlob(userDocPath string, username string) ([]Doc, error) {
var typs []string = []string {
"image/jpeg",
"image/png",
@@ -142,7 +142,7 @@ func extractImgsGlob(userDocPath string) ([]Doc, error) {
info.Name(),
humanize(info.Size()),
info.ModTime(),
- path.Join(userDocPath, info.Name()),
+ path.Join("/docs/", username, info.Name()),
})
}
}