summaryrefslogtreecommitdiff
path: root/forms.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'forms.fnl')
-rw-r--r--forms.fnl8
1 files changed, 7 insertions, 1 deletions
diff --git a/forms.fnl b/forms.fnl
index b4c0795..4e57125 100644
--- a/forms.fnl
+++ b/forms.fnl
@@ -159,7 +159,13 @@
:value-from-html
(fn [value {: data : db}]
(if (= (type value) "table")
- (lib.handle-upload db value nil thumbnail-width)
+ (let [lower-name (_G.must (luna.utf8.lower value.name))
+ thumbnail
+ (if (or (lib.ends-with? lower-name ".jpg")
+ (lib.ends-with? lower-name ".png"))
+ thumbnail-width
+ nil)]
+ (lib.handle-upload db value nil thumbnail))
(not (lib.empty? value))
value
(let [previous-value (. data (.. name "_previous"))]