diff options
| author | unwox <me@unwox.com> | 2025-09-14 20:02:25 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-09-14 20:39:37 +0600 |
| commit | f3a8179ba51eb877b96a79d2806dfa58bd6100bd (patch) | |
| tree | 1c48641777ce83a2675f6340671c11e78d9ab369 /forms.fnl | |
| parent | 496471d630d653d09ac6564c8fb6545b284240f7 (diff) | |
allow video uploads for products
Diffstat (limited to 'forms.fnl')
| -rw-r--r-- | forms.fnl | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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"))] |
