Skip to content

Commit

Permalink
Use correct path for avatar image
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Aug 26, 2024
1 parent e69671a commit cd3fe41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/co/gaiwan/compass/model/user.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
(defn download-avatar [url]
(let [{:keys [^bytes body headers]} (hato/get url {:as :byte-array})
filename (str (sha256-hex body) "." (file-extension (get headers "content-type")))
target (io/file (config/value :uploads/dir))]
target (io/file (config/value :uploads/dir) filename)]
(io/make-parents target)
(with-open [f (io/output-stream target)]
(.write f ^bytes body))
Expand Down

0 comments on commit cd3fe41

Please sign in to comment.