1
0
Fork 0

- [GUI] fixed test for checking mime-type on an image;

- allowed null values for preview url in post's attachments.
This commit is contained in:
cage 2023-12-24 22:22:57 +01:00
parent 7d9f3beffa
commit a71492faa8
2 changed files with 4 additions and 2 deletions

View File

@ -295,7 +295,7 @@
;; one of swconf:*allowed-attachment-type* ;; one of swconf:*allowed-attachment-type*
" type TEXT NOT NULL," " type TEXT NOT NULL,"
" url TEXT NOT NULL," " url TEXT NOT NULL,"
" \"preview-url\" TEXT NOT NULL," " \"preview-url\" TEXT,"
" \"remote-url\" TEXT," " \"remote-url\" TEXT,"
;; url shortened ;; url shortened
" \"text-url\" TEXT," " \"text-url\" TEXT,"

View File

@ -474,7 +474,9 @@
(let ((image (cond (let ((image (cond
((string= mime-type +mime-type-jpg+) ((string= mime-type +mime-type-jpg+)
(scale-jpeg main-window file-path)) (scale-jpeg main-window file-path))
((member mime-type '("image/x-tga" "image/x-targa")) ((member mime-type
'("image/x-tga" "image/x-targa")
#'string=)
(scale-targa main-window file-path)) (scale-targa main-window file-path))
((string= mime-type +mime-type-png+) ((string= mime-type +mime-type-png+)
(scale-png main-window file-path)) (scale-png main-window file-path))