Skip to content

Instantly share code, notes, and snippets.

View alaa-alawi's full-sized avatar

Ala'a Alawi alaa-alawi

  • UAE
  • 11:38 (UTC +04:00)
View GitHub Profile
(defun make-upload-filename ()
(etypecase *upload-filename-generator*
;; the old behaviour.
(null t)
;; the new behaviour.
((or symbol function)
(lambda (&rest args)
(let ((filename (apply *upload-filename-generator* args)))
(when *file-upload-hook*
(funcall *file-upload-hook* filename))
@alaa-alawi
alaa-alawi / util.lisp.orig
Created May 21, 2012 16:07
implementation comparision
;; original implementation
;; hunchentoot;utils.lisp
;;
(let ((counter 0))
(declare (ignorable counter))
(defun make-tmp-file-name (&optional (prefix "hunchentoot"))
"Generates a unique name for a temporary file. This function is
called from the RFC2388 library when a file is uploaded."
(let ((tmp-file-name
#+:allegro