From f3a8179ba51eb877b96a79d2806dfa58bd6100bd Mon Sep 17 00:00:00 2001 From: unwox Date: Sun, 14 Sep 2025 20:02:25 +0600 Subject: allow video uploads for products --- forms.fnl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'forms.fnl') 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"))] -- cgit v1.2.3