|
|
|
@ -738,7 +738,7 @@
|
|
|
|
|
(redirect "/login"))))))) |
|
|
|
|
|
|
|
|
|
(defroute ("/storage/view/media/:slug" :method :GET) (&key slug) |
|
|
|
|
(if (storage:file-exists-p "" "media" slug) |
|
|
|
|
(if (nera:get-storage-file :slug slug) |
|
|
|
|
`(200 (:content-type |
|
|
|
|
,(files::file-type-of |
|
|
|
|
(nera:get-storage-file :slug slug))) |
|
|
|
@ -748,21 +748,11 @@
|
|
|
|
|
(defroute ("/storage/thumb/archive/:slug" :method :GET) (&key slug) |
|
|
|
|
(if (nera:get-archive-entry :slug slug) |
|
|
|
|
(let ((archive-entry (nera:get-archive-entry :slug slug))) |
|
|
|
|
(format t "[THUMBNAIL] ~A~%" (archive::thumbnail-file-type-of archive-entry)) |
|
|
|
|
`(200 (:content-type ,(archive::thumbnail-file-type-of archive-entry)) |
|
|
|
|
,(storage:open-binary-file |
|
|
|
|
"" "archive" (archive::thumbnail-slug-of archive-entry)))) |
|
|
|
|
(on-exception *web* 404))) |
|
|
|
|
|
|
|
|
|
(defroute ("/storage/thumb/page/:slug" :method :GET) (&key slug) |
|
|
|
|
(if (storage:file-exists-p "" "media" slug) |
|
|
|
|
`(200 (:content-type |
|
|
|
|
,(files::file-type-of |
|
|
|
|
(nera:get-storage-file :slug slug))) |
|
|
|
|
,(storage:open-binary-file "" "media" |
|
|
|
|
(format nil "thumbnail-~a" slug))) |
|
|
|
|
(on-exception *web* 404))) |
|
|
|
|
|
|
|
|
|
(defroute ("/storage/manage" :method :GET) () |
|
|
|
|
(hermetic:auth (:logged-in) |
|
|
|
|
;; Authorised |
|
|
|
@ -1007,7 +997,7 @@
|
|
|
|
|
(render |
|
|
|
|
"/user/create-archive.html" |
|
|
|
|
(append (auth:auth-user-data) |
|
|
|
|
`(:alert "File uploaded is not an image. Entry not created.." |
|
|
|
|
`(:alert "File uploaded is not an image. Entry not created." |
|
|
|
|
:title ,title |
|
|
|
|
:keywords ,keywords |
|
|
|
|
:data ,page-content)))) |
|
|
|
|