diff options
Diffstat (limited to 'src/imgreplacer.clj')
| -rw-r--r-- | src/imgreplacer.clj | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imgreplacer.clj b/src/imgreplacer.clj index fe316c7..03ae0e6 100644 --- a/src/imgreplacer.clj +++ b/src/imgreplacer.clj @@ -33,7 +33,11 @@ string replacements)) (defn image-name [url] - (format "%s-%s" (System/currentTimeMillis) (last (.split url "/")))) + (let [fname (last (.split url "/"))] + (format "%s-%s" + (System/currentTimeMillis) + ;; Hack: nginx doesn't like to serve images w/ spaces in them + (.replaceAll fname "%20" "")))) (defn mirror-image [url] (println "fetching" url) |
