diff options
| author | Julian Hurst <ark@mansus.space> | 2024-01-01 16:27:57 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2024-01-01 16:27:57 +0100 |
| commit | 635b5da0768d912a7ddf8a3f1ddc6bb8f8865a45 (patch) | |
| tree | 1c5c53fa54b7b1b49d56f57b71e2a1de573eb778 | |
| parent | b5a3d3f2b1406e8f7575766cb7e05181c3836097 (diff) | |
| download | docspace-635b5da0768d912a7ddf8a3f1ddc6bb8f8865a45.tar.gz | |
Fix paths when downloading selection
| -rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -541,7 +541,8 @@ func download(w http.ResponseWriter, r *http.Request) { sendError(w, r, err.Error(), http.StatusInternalServerError) return } - f, err := os.Open(sel) + filePath := filepath.Join(baseDocDir, username, filepath.Base(sel)) + f, err := os.Open(filePath) if err != nil { sendError(w, r, err.Error(), http.StatusInternalServerError) return |
