summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-02 19:17:43 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-02 19:17:43 (GMT)
commit9a7bb5ea47150a3f89e46e4d00b02a4a5c493a76 (patch)
tree7da0fe5865020d3754ef50e826dfb81fd4af4b07
parent08a180f1ce8ddcca57f28237a09ff75d7b36ef68 (diff)
fix upload cleaner if tempdir ist specified without trailing /
-rw-r--r--src/rhimportd/uploadWeb.go2
-rw-r--r--web-static/upload-form.html3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/rhimportd/uploadWeb.go b/src/rhimportd/uploadWeb.go
index 8e7dfb7..6d6e56e 100644
--- a/src/rhimportd/uploadWeb.go
+++ b/src/rhimportd/uploadWeb.go
@@ -170,7 +170,7 @@ func webUploadCleanerRun(dir *os.File, conf *rhimport.Config, maxAge time.Durati
continue
}
- if err := os.RemoveAll(conf.TempDir + entry.Name()); err != nil {
+ if err := os.RemoveAll(conf.TempDir + "/" + entry.Name()); err != nil {
rhl.Printf("webUploadCleaner: deleting dir '%s' failed: %v", entry.Name(), err)
continue
}
diff --git a/web-static/upload-form.html b/web-static/upload-form.html
index bbb397c..8d41a6e 100644
--- a/web-static/upload-form.html
+++ b/web-static/upload-form.html
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <meta charset="utf-8">
<title>rhimportd File Upload</title>
</head>
<body>
<div class="container">
<h1>rhimportd File Upload</h1>
- <form class="form-upload" method="post" action="/public/upload" enctype="multipart/form-data">
+ <form class="form-upload" method="post" action="https://import.helsinki.at/upload" enctype="multipart/form-data">
<fieldset>
<label for="LOGIN_NAME">Username:</label>
<input type="text" name="LOGIN_NAME">