mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
b2003480fd
3 changed files with 12 additions and 7 deletions
|
|
@ -165,7 +165,7 @@
|
||||||
"Render a form to allow the upload of a file."
|
"Render a form to allow the upload of a file."
|
||||||
[request]
|
[request]
|
||||||
(let [params (keywordize-keys (:params 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)
|
git-repo (hist/load-or-init-repo util/content-dir)
|
||||||
upload (:upload params)
|
upload (:upload params)
|
||||||
uploaded (if upload (ul/store-upload params data-path))
|
uploaded (if upload (ul/store-upload params data-path))
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,12 @@
|
||||||
(timbre/debug
|
(timbre/debug
|
||||||
(str "store-upload mv file: " tmp-file " to: " path filename))
|
(str "store-upload mv file: " tmp-file " to: " path filename))
|
||||||
(if tmp-file
|
(if tmp-file
|
||||||
(do
|
(try
|
||||||
(.renameTo tmp-file
|
(do
|
||||||
(File. (str path filename)))
|
(.renameTo tmp-file
|
||||||
filename)
|
(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?")))))
|
(throw (Exception. "No file found?")))))
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,9 @@
|
||||||
(timbre/error
|
(timbre/error
|
||||||
any
|
any
|
||||||
(str
|
(str
|
||||||
"Failed to parse accept-language header "
|
"Failed to parse accept-language header '"
|
||||||
specifier))
|
specifier
|
||||||
|
"'"))
|
||||||
{}))]
|
{}))]
|
||||||
(merge
|
(merge
|
||||||
messages
|
messages
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue