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*
" type TEXT NOT NULL,"
" url TEXT NOT NULL,"
" \"preview-url\" TEXT NOT NULL,"
" \"preview-url\" TEXT,"
" \"remote-url\" TEXT,"
;; url shortened
" \"text-url\" TEXT,"

View File

@ -474,7 +474,9 @@
(let ((image (cond
((string= mime-type +mime-type-jpg+)
(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))
((string= mime-type +mime-type-png+)
(scale-png main-window file-path))