Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Simon Brooke 2020-02-05 22:32:43 +00:00
commit b2003480fd
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
3 changed files with 12 additions and 7 deletions

View file

@ -165,7 +165,7 @@
"Render a form to allow the upload of a file."
[request]
(let [params (keywordize-keys (:params request))
data-path (str util/content-dir "/content/uploads/")
data-path (str util/content-dir "/uploads/")
git-repo (hist/load-or-init-repo util/content-dir)
upload (:upload params)
uploaded (if upload (ul/store-upload params data-path))

View file

@ -59,8 +59,12 @@
(timbre/debug
(str "store-upload mv file: " tmp-file " to: " path filename))
(if tmp-file
(do
(.renameTo tmp-file
(File. (str path filename)))
filename)
(try
(do
(.renameTo tmp-file
(File. (str path filename)))
filename)
(catch Exception x
(timbre/error (str "Failed to move " tmp-file " to " path filename "; " (type x) ": " (.getMessage x)))
(throw x)))
(throw (Exception. "No file found?")))))

View file

@ -66,8 +66,9 @@
(timbre/error
any
(str
"Failed to parse accept-language header "
specifier))
"Failed to parse accept-language header '"
specifier
"'"))
{}))]
(merge
messages